Loading...

DisplayPDF Error return

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

DisplayPDF Error return

Postby johnb » Tue Aug 25, 2009 4:25 pm

I have a program that opens a PDF file. As I execute the commands I get a Message box popping from the DisplayFromPdfFile function.
The title ba i s"GdPicturePro5S. The message is "Unexpected error was rasied: File no Found". The return error code is 205 - "PDFunexpected error".
If I continue stepping through the code, the page count is read correctly. The next section of code display pages and writes them to a Tif file. I get the same error message when I call the DisplayFrame function with the selected page. If I select OK for all the message boxes, the extraction code works correctly and a tif file is created with the correct pages.
I have include the code segment
Code: Select all
void CImageclass::convertpdf(char *a, char *b)
{
   int nStart, nEnd;

   C_GdViewer   m_viewer;
   C_Imaging   m_imaging;
   if (!m_viewer.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW | WS_HSCROLL | WS_VSCROLL,
      CRect(100, 100, 100, 100), this, AFX_IDW_PANE_FIRST, NULL))
   {
      return ;
   }

   if (!m_imaging.Create(NULL, NULL, WS_CHILD | WS_BORDER,
      CRect(300, 500, 300, 500), this, AFX_IDW_PANE_FIRST, NULL))
   {
      return ;
   }

   m_viewer.SetLicenseNumber ("XXXXX");
   m_imaging.SetLicenseNumber("XXXXX");

   m_viewer.SetLockControl(TRUE);

   int long i = m_viewer.DisplayFromPdfFile(a, NULL);


   int nCount = m_viewer.GetPageCount();

   nStart = 2;
   nEnd = 5;

   for(int npage=nStart;npage<=nEnd;npage++)
   {
      //Convert PDF to Multipage TIF
      m_viewer .DisplayFrame(npage);
      m_imaging.SetNativeImage(m_imaging.CreateClonedImage(m_viewer.GetNativeImage()));
      m_imaging.ConvertTo1Bpp();
      if (npage == nStart)
      {
         m_imaging.TiffSaveAsNativeMultiPage(b, 4);
      }
      else
      {
         m_imaging.TiffAddToNativeMultiPage(m_imaging.GetNativeImage());
         m_imaging.CloseNativeImage();
      }
   }
   m_imaging.TiffCloseNativeMultiPage();
}


Thank you
johnb
 
Posts: 4
Joined: Tue Aug 25, 2009 4:06 pm

Re: DisplayPDF Error return

Postby Loïc » Tue Aug 25, 2009 4:32 pm

Hi,

Are you using the latest edition ?

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: DisplayPDF Error return

Postby johnb » Tue Aug 25, 2009 7:24 pm

viewer.GetVersion, indications version 5.11.
johnb
 
Posts: 4
Joined: Tue Aug 25, 2009 4:06 pm

Re: DisplayPDF Error return

Postby Loïc » Wed Aug 26, 2009 10:25 am

Hi,

The latest returns 5.99011171

Please make upgrade, your problem will probably solved.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron