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

Posted on 2011-05-02
Last Modified: 2012-05-11
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.
Question by:tbird888
    LVL 7

    Accepted Solution

    What you can do is use:
    Graphics g = this.CreateGraphics();
    (points * g.DpiX) / 72 = pixels;

    Open in new window

    pixels will be the number of pixels, from points. Hope this helps.
    LVL 31

    Expert Comment

    by:James Murrell
    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe In a previous Experts Exchange article, How To Rename-Move a Batch of PDF Files Based on Contents of the Files (http://www.experts-exchan…
    Power PDF ( is the newest product from the Document Imaging division of Nuance Communications ( It is available in two editions — …
    In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now