Internet Archive uses the Unix command-line tool pdfinfo to test for "syntax errors" in uploaded PDF files, and rejects the submission if any are found. At the moment, due to the way the IA API is structured, this leaves us with a half-created IA entry, which must be fixed manually once the PDF is corrected. (That is, the job can't simply be re-run within GitHub Actions, as for other types of failure.)
Ideally we would add a fast-fail to the iauploader module, running pdfinfo on the file before any data is created for the work within IA, and exiting if "syntax errors" were reported. TBD how we would incorporate this Unix tool into the existing Python logic.
Internet Archive uses the Unix command-line tool
pdfinfoto test for "syntax errors" in uploaded PDF files, and rejects the submission if any are found. At the moment, due to the way the IA API is structured, this leaves us with a half-created IA entry, which must be fixed manually once the PDF is corrected. (That is, the job can't simply be re-run within GitHub Actions, as for other types of failure.)Ideally we would add a fast-fail to the
iauploadermodule, runningpdfinfoon the file before any data is created for the work within IA, and exiting if "syntax errors" were reported. TBD how we would incorporate this Unix tool into the existing Python logic.