[ 
https://issues.apache.org/jira/browse/PDFBOX-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16538901#comment-16538901
 ] 

Tilman Hausherr commented on PDFBOX-4261:
-----------------------------------------

Yes I see now that the "old" parser makes trouble there too... although for a 
different reason. When {{parseXrefStream}} is called the second time (for the 
signed part), {{xrefTrailerResolver.nextXrefObj()}} is called which resets 
{{XrefTrailerResolver.curXrefTrailerObj}} so all our collected objects from the 
original file are lost.

The 2.0 parser does this too but in reverse order (start from the end) which is 
better because now all object numbers from the initial file are kept. But it's 
probably not perfect either, if an object is added in a first signing and 
changed in the second signing, then it would get a new object number. Maybe 
this could bring trouble in a third signing or if we ever get non-signing 
incremental saving to work, but I won't do more at this time because I really 
don't know enough about that part of the code.

So you'll have to use the new parser. That one is definitely better.

> Invalidated signature signing pdf twice 
> ----------------------------------------
>
>                 Key: PDFBOX-4261
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4261
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Signing
>    Affects Versions: 1.8.15
>            Reporter: Claudio Tortorelli
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 1.8.16
>
>         Attachments: issue_data.zip
>
>
> A customer sent us a pdf that has this problem: when it is signed twice by 
> *pdfbox 1.8.x* the second signature invalidates the first one.
> If we apply the same procedure using *pdfbox 2.0.x* the problem doesn't 
> occur, but the customer required java 1.5 so we can't switch to the new 
> version in this case.
> For +privacy purposes+ we had anonymized the original PDF file by editing 3 
> stream inside the pdf, without altering the original structure. So the file 
> "92752146_noSign_anonymous.pdf" you can find in attachement has not the 
> original text/image streams, but reproduces the problem as the original one.
> Thank you in advance
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to