Robert Bielecki created PDFBOX-2395:
---------------------------------------

             Summary: Signing PDF document changes documentID
                 Key: PDFBOX-2395
                 URL: https://issues.apache.org/jira/browse/PDFBOX-2395
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.8.7
            Reporter: Robert Bielecki


When I invoke the method #setDocumentId(...) on PDDocument the document id 
changes completely.

Following the standard:
Every PDF document should have an ID array in the file trailer. From the PDF 
1.7 Reference, "TABLE 3.13 Entries in the file trailer dictionary":
"ID array (Optional, but strongly recommended; PDF 1.1) An array of two 
byte-strings constituting a file identifier (see Section 10.3, “File 
Identifiers”) for the file. ..."
In section "10.3 File Identifiers" it says:
"File identifiers are defined by the optional ID entry in a PDF file’s trailer 
dictionary (see Section 3.4.4, “File Trailer”; see also implementation note 162 
in Appendix H). The value of this entry is an array of two byte strings. The 
first byte string is a permanent identifier based on the contents of the file 
at the time it was originally created and does not change when the file is 
incrementally updated. The second byte string is a changing identifier based on 
the file’s contents at the time it was last updated."

See original issue: 
https://joinup.ec.europa.eu/asset/sd-dss/issue/signing-pdf-document-sd-dss-changes-id-string

So if I understand well only the second element must change. Please could you 
provide me with your understanding of the problem.
Thanks / Bob



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to