A sample document:
I'm trying to read a bookmark's GoTo action (uses a named destination).
IPXC_Action_Goto.IsNamedDest returns true.
IPXC_Action_Goto.DestName returns the correct name of the named destination.
Trying to fill the PXC_Destination from it via IPXC_Document.GetNamedDestination raises an exception: "Invalid index in array."
The "problem" with this specific PDF (attached) is that it has the "old" style (PDF 1.1) "/Dests" entry in the Catalog and does not have the Dests name tree (so no "/Names <</Dests ... >>" in Catalog).
Here's how it looks:
Code: Select all
21 0 obj
<<
/Type /Catalog
/Pages 2 0 R
/Outlines 18 0 R
/PageMode /UseOutlines
/Dests 17 0 R
>>
endobj
Code: Select all
17 0 obj
<<
/name1 8 0 R
/name2 15 0 R
/name3 16 0 R
>>
endobj
Code: Select all
8 0 obj
[5 0 R /XYZ 33 813.500000 0]
endobj
Further, the IPXC_Document.GetNameTree("Dests") does return IPXC_NameTree, but Count is 0 (as really there's no "Dests" name tree in the PDF). Should GetNameTree("Dests") return null?
p.s.2
For the moment I can go around the problem by working with IPXS_Document directly and looking for "/Dests" entry in Catalog.
-žarko