Skip to main content

Crate zpdf_document

Crate zpdf_document 

Source

Re-exports§

pub use annotation::Annotation;
pub use destinations::DestView;
pub use destinations::Destination;
pub use doc_info::DocInfo;
pub use embedded_files::EmbeddedFile;
pub use embedded_files::EmbeddedSource;
pub use forms::AcroForm;
pub use forms::FieldKind;
pub use forms::FieldValue;
pub use forms::FormField;
pub use optional_content::OcConfig;
pub use outline::OutlineItem;
pub use output_intents::OutputIntent;
pub use page::PdfPage;
pub use page::ResourceDict;
pub use page_labels::PageLabelStyle;
pub use page_labels::PageLabels;
pub use xmp::XmpMetadata;

Modules§

annot_appearance
Appearance generation for markup & geometric annotations whose producer shipped no /AP stream (PDF 32000-1 §12.5.6).
annotation
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
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.
doc_info
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.
embedded_files
Embedded files and associated files (ISO 32000-1 §7.11, ISO 32000-2 §7.11.4).
font_loader
forms
AcroForm interactive-form support (PDF 32000-1 §12.7).
optional_content
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?”.
outline
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.
output_intents
Output intents (/OutputIntents), document-level (catalog, ISO 32000-1 §14.11.5) and page-level (ISO 32000-2 / PDF 2.0).
page
page_labels
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
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.

Structs§

Catalog
PdfDocument