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

Trailer Syntax error, ID is different in the first and the last trailer - for PDF with incremental updates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.12, 2.0.3
    • 2.0.4, 3.0.0 PDFBox
    • Preflight
    • None

    Description

      As reported at the users mailing list:


      Hello guys,

      I have the following problem using apache.pdfbox when validating a valid PDF/A-1 file, which is being signed twice:
      1. The online validator confirms that the file is valid (https://www.pdf-tools.com/pdf/validate-pdfa-online.aspx)
      2. But when I validate it using the following code:

      PreflightParser parser = new PreflightParser(byteDatasource);
      parser.parse();
      PreflightDocument document = parser.getPreflightDocument();
      document.validate();
      result = document.getResult();
      

      3. The file is linearized
      4. I get that the file is invalid and the error description reads:

      Trailer Syntax error, ID is different in the first and the last trailer</i>
      

      According to issues PDFBOX-3256 and PDFBOX-2502 this should be fixed?

      Could anyone give me a tip how to go around this problem or would that be a bug?
      The pdf file is attached.


      Analysis:
      The original PDF is linearized with a subsequent incremental update.
      According to ISO 32000-1 F1

      Incremental update shall still be permitted, but the resulting PDF is no longer linearized and subsequently shall be treated as ordinary PDF. Linearizing it again may require reprocessing the entire file; see G.7, "Accessing an Updated File" for details.

      as the file shall no longer be treated as linearized the provision about matching ID's as outlined in PDFBOX-2502 no longer applies.

      Attachments

        1. testfile_signed_twice.pdf
          95 kB
          Maya Angelova
        2. testfile_signed_once.pdf
          85 kB
          Maya Angelova
        3. testfile_original.pdf
          20 kB
          Maya Angelova
        4. Pardes13_Rez02.pdf
          138 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            msahyoun Maruan Sahyoun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: