Nice error message from the pdfinfo command-line tool:
$ pdfinfo empty-file.pdf
Error: May not be a PDF file (continuing anyway)
Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Couldn't find trailer dictionary
Error: Couldn't read xref table
The equivalent error message from pdfname:
$ pdfname empty-file.pdf
ProcessFailure "Error: May not be a PDF file (continuing anyway)\nError: PDF file is damaged - attempting to reconstruct xref table...\nError: Couldn't find trailer dictionary\nError: Couldn't read xref table\n"
pdfname: PDF file or its metadata information is damaged
Nice error message from the
pdfinfo
command-line tool:The equivalent error message from
pdfname
: