Annotation parsing: /Annots entries resolved into renderable form —
/Rect, /F flags, the /AS-selected normal appearance stream, and the
optional-content membership (/OC). Painting itself happens in
zpdf-content, which replays the appearance stream as a form XObject mapped
onto /Rect (PDF 32000-1 §12.5.5).
Destinations (ISO 32000-1 §12.3.2): a location and view within the document
that a bookmark or link navigates to. A destination is either explicit —
an array [page /Fit …] naming a page object (or, for remote go-to actions,
a page number) and a view — or named: a name/string that indirects
through one of two registries to such an array.
The document information dictionary (ISO 32000-1 §14.3.3): the trailer’s
/Info entry, carrying human-authored metadata — title, author, subject,
keywords, the producing software, and creation/modification timestamps.
Optional-content (layer) configuration: the catalog’s /OCProperties
default configuration determines which optional-content groups render.
Membership evaluation for /OC entries (OCG refs, OCMDs and visibility
expressions) lives in zpdf-content, which has the object graph in hand;
this module only answers “is group X on?”.
Document outline / bookmarks (ISO 32000-1 §12.3.3). The catalog’s
/Outlines dictionary roots a tree of outline items, each a /Title plus a
navigation target — a destination (/Dest) or an action (/A, typically a
go-to or a URI). Items are linked as a doubly-linked sibling list (/First,
/Last, /Next, /Prev) with /First//Count descending into children.
Page labels (ISO 32000-1 §12.4.2): the printed page “numbers” a viewer shows
and a user types to navigate — which are not the physical 0-based page
indices. A document commonly numbers front matter with lowercase roman
numerals (i, ii, iii …), the body with decimals (1, 2, 3 …), and an
appendix with a prefix (A-1, A-2 …). The catalog’s /PageLabels entry is a
number tree mapping the 0-based index of the first page of each labeling
range to a label dictionary describing how that range is numbered.
XMP document metadata (ISO 32000-1 §14.3.2 / Adobe XMP). The catalog’s
/Metadata entry is a stream carrying an XMP packet — RDF/XML describing the
document with Dublin Core (dc:), XMP Basic (xmp:), and PDF-schema (pdf:)
properties. PDF 2.0 deprecates the /Info dictionary in favour of this, so
XMP is increasingly the only place some metadata lives.