Chris Ulbright,

Chris Ulbright wrote:
> I have run into an issue when adding bookmarks to an existing PDF. This
> particular code has been working for some time so I¹m not sure what is
> different in this case. The PDF file is attached.

Your sample PDF is flawed:

Its catalog:

2 0 obj << /Type /Catalog /Pages 5 0 R /Outlines << /Count 0 >>
>>
endobj

But according to ISO 32000-1:2008 on the Outlines entry (cf. Table 28):

Outlines dictionary (Optional; shall be an indirect reference) The outline
dictionary that shall be the root of the document’s outline hierarchy (see
12.3.3, "Document Outline").


iText relies on documents adhering to the spec and expects the Outlines
value to be an indirect reference.

Regards,   Michael.

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/ClassCastException-when-additing-bookmarks-tp3873579p3873808.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to