Skip to main content

Module destination

Module destination 

Source
Expand description

Typed PDF destinations and actions.

Outlines, link annotations, and the document’s /OpenAction all reference either a Destination (where to scroll/zoom on a page) or an Action (what to do when activated). This module handles parsing both into typed Rust values.

Named destinations (Destination::NamedDest) are returned as the raw name string. Resolution against the document’s name tree happens in Phase 3 once the name-tree walker exists; until then consumers can still see the name and look it up themselves via the resolver if they need to.

Enums§

Action
PDF action — what to do when a link / outline / page event fires.
Destination
A target location within (or referenced from) a PDF document.
ViewSpec
PDF view spec from a destination array.

Functions§

parse_action
Parse an action dict into a typed Action.
parse_destination
Parse a destination object — array, name, or dict-with-/D — into a typed Destination.
parse_explicit_destination
Parse an explicit-destination array [page mode args...].
parse_named_destinations
Build the document-wide named-destination table by merging both PDF-spec sources:
parse_view_spec
Parse a view-spec mode name and its argument tail.