Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.7
Description
When adding a signature to a PDF document which already contains an invisible signature, the following exception is thrown:
java.lang.IllegalStateException: signature reserve byte range has been changed after addSignature(), please set the byte range that existed after addSignature()
Step to reproduce:
- Get a simple PDf document having an empty signature field and signed (using Adobe) with an invisible signature.
- Run the org.apache.pdfbox.examples.signature.CreateVisibleSignature setting lateExternalSigning = true
Full Stack trace:
java.lang.IllegalStateException: signature reserve byte range has been changed after addSignature(), please set the byte range that existed after addSignature() at org.apache.pdfbox.pdmodel.PDDocument.saveIncrementalForExternalSigning(PDDocument.java:1361) at org.apache.pdfbox.examples.signature.CreateVisibleSignature.signPDF(CreateVisibleSignature.java:270)
Use the attached PDF as reference to reproduce
Maybe related to: PDFBOX-3811
Attachments
Attachments
Issue Links
- relates to
-
PDFBOX-3811 Problem with calling "saveIncrementalForExternalSigning" more than once in the same document
- Closed