You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Michael Klink (Jira)" <ji...@apache.org> on 2021/03/01 16:35:00 UTC

[jira] [Commented] (PDFBOX-4147) Last PDF line should contain '%%EOF'

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

Michael Klink commented on PDFBOX-4147:
---------------------------------------

Probably this issue should be closed as "not a bug".
It being marked an "unresolved, major bug" gives people the wrong idea, see also https://github.com/apache/pdfbox/pull/105

> Last PDF line should contain '%%EOF'
> ------------------------------------
>
>                 Key: PDFBOX-4147
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4147
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 2.0.8
>            Reporter: Pierrick Vandenbroucke
>            Priority: Major
>         Attachments: EmptyPage.pdf
>
>
> Hello,
> In the DSS framework, I try to retrieve the original document from a signed PDF. If the document before adding the signature finished with '%%EOF', it doesn't work. Actually, it only works if the document is finished  with a EOL character.
> After some investigations, I found this line in the [PDFBox project|https://github.com/apache/pdfbox/blob/2.0.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java#L1126].
> IMHO, the EOL shouldn't be added after the '%%EOF'. If we refer to the ISO 32000-1:2008 chapter 7.5.5 :
> {panel:title=ISO 32000-1:2008}
> The last line of the file shall contain only the end-of-file marker, %%EOF.
> {panel}
> When I do a saveIncremental, the data to be signed finishes with a EOL character.
> So, I'm not able to retrieve exactly the same binaries. In some cases, it matches otherwise I have a EOL too much.
> Could you have a look ? 
> Thanks in advance
>  
> Related ticket in DSS : [https://ec.europa.eu/cefdigital/tracker/browse/DSS-1376]
>  Unit test in DSS : [https://github.com/esig/dss/blob/develop/dss-pades/src/test/java/eu/europa/esig/dss/pades/GetOriginalDocumentTest.java]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org