[ 
https://issues.apache.org/jira/browse/PDFBOX-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13862422#comment-13862422
 ] 

Michael Klink commented on PDFBOX-1802:
---------------------------------------

I don't think it is a matter of whether or not the OP has a sample document but 
of whether or not the specification allows it.

The PDF specification [ISO 
32000-1|http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf]
 in section 7.3.6 *Syntax --> Objects --> Array Objects* states that 
{quote}
an array’s elements may be any combination of numbers, strings, *dictionaries*, 
or any other objects, including other arrays,
{quote}
and in section 7.3.10 *Syntax --> Objects --> Indirect Objects*
{quote}
Except were documented to the contrary any object value may be a direct or an 
indirect reference.
{quote}

The only obvious exception are stream objects because
{quote}
All streams shall be indirect objects
{quote}
according to section 7.3.8.1 *Syntax --> Objects --> Stream Objects --> 
General*.

Thus, even if there may be no need to have direct dictionaries in PDFs to form 
the explicitly defined structures in the specification (I have not checked in 
detail, maybe there *is*), such objects may be used in extensions of the 
standard and, therefore, necessary.

> COSDictionary in COSArray setDirect(true) but dic written indirect
> ------------------------------------------------------------------
>
>                 Key: PDFBOX-1802
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1802
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 1.8.2
>            Reporter: Cedomir Suljagic
>              Labels: cosarray, setdirect
>
>               COSDictionary dic = new COSDictionary();
>               dic.setDirect(true);
>               dic.setItem...
>               COSArray array = new COSArray();
>               array.setDirect(true);
>               array.add(dic);
> Dictionary in array is indirect.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to