I have a corrupted pdf file and want to know, if ghostscript will recognize it.
With following statement, I tried to configure it out, if pdf is corrupt or not:
gs \
-o /dev/null \
-sDEVICE=nullpage \
/path/to/corrupt.pdf
The statement echo $? return always 0. I can't even open the pdf file with acrobat reader.
Why gs does not recognize it? Or is there an alternativ to ghostscript?
-o ... -sDEVICE=...? Are there any (orhter) errors or a return code then? What willfile /path/to/corrupt.pdfsay? If you're lucky enough, it is so corrupt that it won't be even recognizable as pdf.