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

Problem reading signed documents without new line after %%EOF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.0
    • Writing
    • None

    Description

      If a document without an new line after %%EOF was signed incremental, the first object in the revision will be wrote directly behind the %%EOF without a blank or a new line

      this will look like this:
      %%EOF1 obj <<......>>

      The adobe reader can read such documents, the pdfbox skip it. I looked inside the pdf specification and can't find more details about such kind of documents, so I think this is a valid document. In case that some readers can handle it, I added a "new line" before writing the incremental update with the PDDocument.saveIncremental method.

      Attachments

        1. newLineAfterEOF.patch
          0.4 kB
          Thomas Chojecki

        Activity

          People

            adamnichols Adam Nichols
            tchojecki Thomas Chojecki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: