Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem of having some users creating very large PDFs. On the other hands I have PDF sent from our fax machines that are really small in size and totally printable. My question is

  • Is there any way I can find the resolution (DPI) of the PDF. I search the internet, could not find any answer. Checked the properties of the file, this information was not stored there, at least in my case.
  • What is the optimum resolution of converting text file into image PDF. 96dpi, 300dpi or more ?
  • Fun question. Can I resize a PDF which was scanned with high dpi into smaller dpi?

I know some answers might not be available as I have already searched the internet and could not find answers.

Note: My PDF are entirely images, text to images. I am also familiar with primoPDF (free) something you can experiment with

share|improve this question

I know that you don't want to extract the image data, but this is probably the only way to find out the original resolution.

On *nix, if you have ImageMagick's identify and Xpdf installed1:

pdfimages -j test.pdf test && for file in $(find . -name "test*.jpg"); do identify "$file"; done

Where test.pdf is your input PDF. The output files are written to test-000.jpg, test-001.jpg, et cetera. This would give you the original size of all the contained images of that PDF2.

Example output for a PDF file that only contains one big image:

./test-000.jpg JPEG 2500x1961 2500x1961+0+0 8-bit DirectClass 1.022MB 0.000u 0:00.000

1) Windows has these too, but the script would be different of course.
2) Note that images don't really carry DPI information. Simply speaking: That's just something used for printing and images don't need an inherent measure of DPI.

What is the optimum resolution of converting text file into image PDF. 96dpi, 300dpi or more?

Generally, anything you want to print should be 300dpi or more. Most printers will handle a higher resolution too.

share|improve this answer
A version of pdfimages (perhaps more recent than the original question) from the poppler project adds the -list option: pdfimages -list test.pdf. Rather than outputting files, this lists size and image type. Still doesn't explicitly give you resolution, but avoids creating output files. – scruss Oct 30 '13 at 12:42

A PDF file doesn't have an inherent resolution, each raster-image within it (if any) will have it's own resolution. I don't know of a simple way to extract a single number for median/modal resolution of embedded image XObjects.

share|improve this answer
By the way I am not interested in extracting an image data from pdf, I just want to know what was the scan resolution and if it is very high unnecessarily would like to avoid that in future. – Dave Nov 21 '11 at 16:39
@Dave: Actually I meant extract the information about the embedded images not extract the image. But slhck's answer may solve your problem. – RedGrittyBrick Nov 21 '11 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .