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 some scanned PDF files that I want to process using ScanTailor. To do that I need to extract images (as TIFF). I have been using GhostScript as follows:

gs -sDEVICE=tiffgray -r400x400 -dNOPAUSE -dBATCH -sOutputFile="file0000.tiff" "input.pdf"

The problem is I don't know what is the resolution of the original images in PDF. Is there any way to make GhostScript to adapt its resolution based on the images in the PDF file? Or is there any other free Linux software that can do that?

Adobe Acrobat does that:

Colorspace/Resolution Specifies a color space and resolution for the output file. You can let Acrobat determine these settings automatically.

share|improve this question

The pdfimages from poppler-utils extracts images from pdf files, it saves them as PBM for monochrome images and PPM for non-monochrome images but you can make it output jpg instead. If that does not suite you then you can use pdfimages -list to get a list of images and their information including resolutions.

share|improve this answer

You must log in to answer this question.

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