Validate PDF/check startxref #769
-
Hi, What are ways you can check if a PDF is valid/or check if the startxref exists? My case: Only on certain pdfs the merge call throws: UglyToad.PdfPig.Core.PdfDocumentFormatException: 'Could not find the startxref within the last 2048 characters.' I sadly cannot give the base64 data in question due to personal data. Thank you for your time |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Simple solution to my issue:
Maybe an option to skip bad PDF's could be added to the Merge call? |
Beta Was this translation helpful? Give feedback.
Simple solution to my issue:
I got the bytes of the base64 string then decoded the bytes into the raw string of the PDF, then checked if the raw PDF string contained startxref.
Maybe an option to skip bad PDF's could be added to the Merge call?