I understand that you cannot load a PDF to a GDPicture Object directly from a file, but you can transfer the native image from the Viewer to it.
1 When I tried the native transfer it only did the first page, is there a way to transfer all the pages?
2 Are there any plans add this feature? If so, how long still you think it will be released?
Loading a PDF into a GdPicture Object
Hi,
Draw a gdviewer object with the visible property to False.
And run this code to convert all the PDF pages as independent JPG files:
Best regards,
Loïc
Yes, you can do that easily:#1 When I tried the native transfer it only did the first page, is there a way to transfer all the pages?
Draw a gdviewer object with the visible property to False.
And run this code to convert all the PDF pages as independent JPG files:
Code: Select all
Dim nCpt As Long
Dim oGdPicture As New GdpicturePro.cGdPicture
gdViewer1.SetIsedQuickPDFLicenceNumber ("343930329827F396959C620C21A04AAC")
gdViewer1.DisplayFromPdfFile ("c:\test.pdf")
For nCpt = 1 To gdViewer1.NumPages
gdViewer1.DisplayFrame (nCpt)
oGdPicture.SetNativeImage (gdViewer1.GetNativeImage)
call oGdPicture.SaveAsJpeg("c:\extract" & Trim(Str(nCpt)) & ".jpg")
Next nCpt
Loïc
Who is online
Users browsing this forum: No registered users and 2 guests