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

"Limits" entry should not added to the root node dictionary of name trees

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.4.0
    • None
    • PDModel
    • None
    • Adobe Acrobat Pro v9.4.1, Windows 7 Pro x64

    Description

      Embedding file using PDComplexFileSpecification (as shown in org.apache.pdfbox.examples.pdmodel.EmbeddedFiles example) adds "Limits" entry to the name tree root node dictionary associated with EmbeddedFiles entry in PDF documents name dictionary. Here is a fragment taken from the PDF document created by EmbeddedFiles example:

      ...
      3 0 obj
      <<
      /EmbeddedFiles 5 0 R
      >>
      5 0 obj
      <<
      /Limits [(My first attachment) (My first attachment)]
      /Names [(My first attachment) 8 0 R]
      >>
      ...

      Such PDF document opened in Adobe Acrobat does not show embedded files in attachments panel, unless "Limits" entry is removed or commented.

      According to PDF3200:2008 specification (see clause "7.9.6 Name Trees") "Limits" entry in name tree node dictionary can only appear in intermediate or leaf node, but not root node.
      "The tree shall always have exactly one root node, which shall contain a single entry: either Kids or Names but not both. If the root node has a Names entry, it shall be the only node in the tree. If it has a Kids entry, each of the remaining nodes shall be either an intermediate node, that shall contain a Limits entry and a Kids entry, or a leaf node, that shall contain a Limits entry and a Names entry."

      Attachments

        1. sample.pdf
          2 kB
          Petras

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              abyss Petras
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: