Expand description
PDF name tree traversal.
Per ISO 32000-2 §7.9.6, several catalog entries (named destinations,
embedded files, JavaScript, AP appearance streams, etc.) live in
name trees: B-tree-like structures keyed by string. Each node is
either a leaf (has /Names — an array of alternating
(string, value) pairs in sorted order) or a branch (has /Kids
— references to child nodes). The root may have either or both.
walk_name_tree is generic over the value type: callers supply
a parser that converts a PdfObj value into their typed
representation, and the walker traverses the tree producing a
HashMap<String, T> of every leaf entry.
Functions§
- walk_
name_ tree - Walk a PDF name tree starting at
root, producing a map of all leaf entries.