Need to find PDF image resolution via Preflight and VB.NET using the JSObject
Posted on 2011-05-02
Hello. I am currently maintaining a VB.NET file conversion program that converts PDF files into TIFF files using iTextSharp. We've been seeing a problem with page sizes being converted incorrectly (a 24"x36" file will convert to 8.5"x11") causing the page's information to be unreadable. The issue has shown itself to be the resolution of the image contained in the PDF. It's showing as 2222.222dpi in Acrobat 9's Preflight profile.
I am attempting to insert some validation to ensure the images aren't at this resolution. I am able to find the PDF size in points, but I am stuck trying to find the width/height in Pixels or image resolution directly.
I know you can call Preflight directly in the code using the JSObject, but I'm having trouble finding any documentation on how to call "List page objects, grouped by type of object" and find either the image's resolution directly or the width/height pixel count in order to perform the necessary calculations.
I was hoping someone has been through this before and had some insight or could point me to an example on how to grab this info. I've been through the SDK and Documentation and couldn't find anything but a very basic preflight tutorial.
Thanks in advance.