Check if a PDF is properly formed
Closed this issue · 1 comments
jjrboucher commented
If possible, use a BASH command to check if the PDF being passed to the script is properly formed or malformed. If malformed, advise the user and document in the log file.
Also do the same for any prior version PDFs that are extracted. Document in the log file if each is properly formed or not (and indicate on screen during execution), and only attempt to extract images if it is properly formed.
jjrboucher commented
Completed. Uses the pdfinfo command in the new function checkPDF to determine if it's a valid PDF. In testing, a malformed PDF gives an error output and no output to STDOUT. Script uses that as a means of checking if the PDF is valid or not.