Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>/Dest</code> entry in an outline item dictionary can either be a <strong>name</strong>, a <strong>string</strong>, or an <strong>array</strong>.</p> <ul> <li><p>The simplest case is if it's an <strong>array</strong>; then the first item is the page object the outline entry points to (a dictionary). To get the page number, you have to iterate over all pages in the document and see which one is equal (<code>==</code>) to the dictionary you have (<code>CGPDFPageRef</code>s are actually <code>CGPDFDictionaryRef</code>s). You could also traverse the page tree, which is a bit harder, but may be faster (not as much as you might expect, I wouldn't optimize prematurely here). The other items in the array are position on the page etc., search for "Explicit Destinations" in the PDF spec to learn more.</p></li> <li><p>If the entry is a <strong>name</strong> or <strong>string</strong>, it is a named destination. You have to map the name to a destination from the document catalog's <code>/Dests</code> entry which is a dictionary that contains a name tree. A name tree is essentially a tree map that allows fast access to named values without requiring to read all the data at once (as with a plain dictionary). Unfortunately, there's no direct support for name trees in Quartz, so you'll have to do a little more work to parse this structure recursively (see "Name Trees" in the <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf" rel="nofollow">PDF spec</a>).</p></li> </ul> <p>Note that an outline item doesn't necessarily have a <code>/Dest</code> entry, it can also specify its destination via an <code>/A</code> (action) entry, which is a little bit more complex. In most cases, however, the action will be a "GoTo" action that is essentially a wrapper for a destination.</p> <p>The mapping of names to destinations can also be stored as a plain dictionary. In that case, it's in the <code>/Dests</code> entry of the /Names dictionary in the document's catalog. I've rarely seen this though and it was deprecated after PDF 1.2 (current is 1.7).</p> <p>You will definitely need the PDF spec for this: <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf" rel="nofollow">http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload