[ 
https://issues.apache.org/jira/browse/PDFBOX-3978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-3978:
------------------------------------
    Fix Version/s: 3.0.0
                   2.0.8

> IllegalStateException on saveIncrementalForExternalSigning
> ----------------------------------------------------------
>
>                 Key: PDFBOX-3978
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3978
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Signing
>    Affects Versions: 2.0.7
>            Reporter: Alessandro Marini
>            Assignee: Tilman Hausherr
>              Labels: regression
>             Fix For: 2.0.8, 3.0.0
>
>         Attachments: Test_certified_invisible.pdf
>
>
> When adding a signature to a PDF document which already contains an invisible 
> signature, the following exception is thrown:
> {noformat}
> java.lang.IllegalStateException: signature reserve byte range has been 
> changed after addSignature(), please set the byte range that existed after 
> addSignature()
> {noformat}
> 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:
> {noformat}
> 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)
> {noformat}
> Use the attached PDF as reference to reproduce
> Maybe related to: PDFBOX-3811



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to