Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4147

Last PDF line should contain '%%EOF'

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.0.8
    • None
    • Writing
    • None

    Description

      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.

      IMHO, the EOL shouldn't be added after the '%%EOF'. If we refer to the ISO 32000-1:2008 chapter 7.5.5 :

      ISO 32000-1:2008

      The last line of the file shall contain only the end-of-file marker, %%EOF.

      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

       

      Attachments

        1. EmptyPage.pdf
          5 kB
          Maruan Sahyoun

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            pvandenbroucke Pierrick Vandenbroucke
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment