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

Thomas Chojecki resolved PDFBOX-1837.
-------------------------------------

    Resolution: Not A Problem
      Assignee: Thomas Chojecki

The save method rewrite the document and destroy the signature. If you want to 
manipulate the document, you shall use only the saveIncremental method. 

The only problem is, that the saveIncremental method was designed for signing 
only. If you want to store additional content this would not work.

So after signing you can only resign or need to leave the document as it is. 
For applying changes to the document, the COSWriter need to be extended or 
replaced. At the moment it does not work, so maybe in a future release we 
implement a fully functional incremental save.

> PDDocument.save(String) doesn't correctly save digital signatures
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-1837
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1837
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.3
>            Reporter: Álison Fernandes
>            Assignee: Thomas Chojecki
>            Priority: Blocker
>
> After digitally signing a PDF, if I save it with PDDocument.save(String), 
> Adobe Reader reports the signature as invalid. The same doesn't happen if the 
> PDF is saved with PDDocument.saveIncremental(FileInputStream, OutputStream).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to