Need to find PDF image resolution via Preflight and VB.NET using the JSObject

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.
tbird888Asked:
Who is Participating?
 
roshkinsConnect With a Mentor Commented:
What you can do is use:
Graphics g = this.CreateGraphics();
(points * g.DpiX) / 72 = pixels;
g.Dispose();

Open in new window


pixels will be the number of pixels, from points. Hope this helps.
0
 
James MurrellProduct SpecialistCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
All Courses

From novice to tech pro — start learning today.