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

                 Key: PDFBOX-933
                 URL: https://issues.apache.org/jira/browse/PDFBOX-933
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 1.4.0
         Environment: Adobe Acrobat Pro v9.4.1, Windows 7 Pro x64
            Reporter: Petras


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."


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to