I know that in the “Insertable Objects” tab on the Components window, that there is “Adobe Acrobat Document,” but that isn’t really what I’m looking for. I’m not sure what the “Adobe Acrobat 7.0 Browser Control Type Library 1.0” (created an error when I tried to use it) is in the “Controls” tab.
Here is the functionality that I need:
- read how many pages are in a PDF file
- import each page as a background into a picturebox
I saw this here on SO regarding converting PDF’s to TIFF’s, so I’m not sure if this would be the best way to go? https://stackoverflow.com/questions/2…rt-pdf-to-tiff ; I downloaded ImageMagick and am not sure how to use it, but I’ll be looking into it (not sure whether I have to use “Shell” on ImageMagick’s convert.exe or if there is a better way [like using a DLL])
I also saw this: http://www.quickpdflibrary.com/faq/c…age-to-pdf.php
This one looked promising, but it appears to be for .NET: http://social.msdn.microsoft.com/For…-c1d98a90a2a2/
I’ll be working on this, but anything to point me in the right direction is appreciated and detailed information is greatly appreciated — maybe even rewarded with a bounty. 😉
If a commercial library is an option for you, you could try with Amyuni PDF Creator ActiveX. You could embed it in your application as a viewer, or you could use the method ExportToJPeg_Method and load the resulting images in your picturebox instead.
Sample code:
You could also use ImageMagic for PDF to image conversion by using shell execution:
Be aware that ImageMagic “PDF to image” conversion requires ghostscript, which is a GPL project, which means that you are not supposed to use it for free in a commercial closed-source application.
Usual disclaimer applies for the first suggestion