Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Looking for a command line tool for Windows / linux environment that can check a PDF file for any errors (not for repairing).

share|improve this question

migrated from Oct 8 '10 at 12:54

This question came from our site for professional and enthusiast programmers.

With Ghostscript on Windows use:

gswin32c.exe ^
   -o nul ^
   -sDEVICE=nullpage ^

On Linux use:

gs \
   -o /dev/null \
   -sDEVICE=nullpage \

All errors or warnings encountered by Ghostscript it will print to stdout/stderr.

It will NOT convert your original file, just report what would happen if you actually did a real conversion. This serves a quite good chcker... just as you wanted it. Just use the latest Ghostscript version (current one is 9.02).

share|improve this answer

One thing I use on Linux is pdfinfo, which comes with the poppler package.

For normal PDF files, it gives me about 15 lines of information on the file. For the broken PDF files I have, or non-PDF files, it spits out errors before giving the 15 lines of information, if any. I can pipe the output to a "grep ^Error" if I just want the errors. Or if I so wanted I could just modify the source code to just output errors.

share|improve this answer

Well, I'm not sure about that, but i think that ghostscript can be of use. It works with PS and with PDF, and I heard that it is very strict.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.