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

Tilman Hausherr commented on PDFBOX-3256:
-----------------------------------------

Yes, PDFBOX-2502 has been fixed long ago. I mentioned the issue because of the 
comment "In a linearized PDF, if the ID keyword is present in both the first 
page trailer dictionary and the last trailer dictionary, the value to both 
instances of the ID keyword shall be identical." So if your file is linearized 
and the second ID string is different in the first and the last trailer, then 
it is not a valid PDFA.

But don't believe me... Here's a PDFA file on which I have changed the last ID. 
Now it it is no longer a PDFA file according to PDFBox, and also not according 
to PDF-Tools ( http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx ).

>  Trailer Validation error PDF/A1-b
> ----------------------------------
>
>                 Key: PDFBOX-3256
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3256
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Preflight
>    Affects Versions: 2.0.0
>            Reporter: Davide Silvestri
>         Attachments: PDFA-Linearized.pdf
>
>
> According to PDF specifications "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." 
> We are having a problem validating a PDF/A1-b when preflight checks first and 
> last trailer. TrailerValidationProcess.java compares IDs in the compareIds 
> function checking that both values remain the same in the first and last 
> trailer, but it checks both the first byte AND the second byte of the trailer 
> into the cycle (line 206). Being the second byte a changing item when the 
> file is updated (eg. with a digital signature), we have this error in 
> validation "1.4.6.: Trailer Syntax error, ID is different in the first and 
> the last trailer" even if the first item remains the same and so the PDF/A1-b 
> compliance should be verified.
> Please can you help me with this issue?
> Thank you very much.
> Davide



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

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

Reply via email to