0

i have one example of PDF file, process signed with PDFBox 2.0.25 after i sign, process validation AddValidationInformation but only this document encountered an error Document has been altered or corrupted. the PDF was created online with https://products.aspose.app/.

code example i use for signing from here https://github.com/apache/pdfbox/blob/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature2.java

Example pdf error

any suggest ?

Lonzak
  • 9,334
  • 5
  • 57
  • 88
blinkbink
  • 89
  • 5
  • 1
    The most common error is tranporting the PDF not as binary **application/octet-stream** or such, but as **text/...** which will corrupt the original PDF. – Joop Eggen Aug 23 '22 at 10:30
  • transporting before signing or after signing the PDF ? – blinkbink Aug 23 '22 at 10:52
  • 1
    I remember some problems with Aspose PDFs, see https://stackoverflow.com/questions/68801701/ I haven't had the time to look at your PDF so maybe Aspose is innocent. – Tilman Hausherr Aug 23 '22 at 13:02
  • 1
    Indeed, just as @Tilman pointed out as possibility, the original PDF file is invalid (in a very minor way) which in signing contexts can result in Adobe Acrobat claiming "altered or corrupted" contents. As mentioned in the answer Tilman referred to, creating PDFs with this (minor) error has been a bug in Aspose software for many years. You can fix the file by loading it with PDFBox and saving it right away. – mkl Aug 23 '22 at 13:10
  • 1
    Ok, I'll close your question as duplicate of other questions dealing with failed verifications in Adobe Acrobat due to invalid initial cross reference table. – mkl Aug 24 '22 at 11:24

0 Answers0