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::build_resources;
pub use forms::escape_text;
pub use forms::generate_widget_appearance;
pub use forms::standard_font_dict;
pub use forms::unicode_to_winansi;
pub use forms::AcroForm;
pub use forms::FieldKind;
pub use forms::FieldValue;
pub use forms::FormField;
pub use forms::GeneratedAppearance;
pub use forms::FF_READONLY;
pub use ink::InkAnnotDict;
pub use ink::InkAnnotationBuilder;
pub use measure::GeographicCoordinateSystem;
pub use measure::Measure;
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 signature::ByteRangeCoverage;
pub use signature::CryptoStatus;
pub use signature::DigestStatus;
pub use signature::RevocationStatus;
pub use signature::Signature;
pub use structure::StructElem;
pub use structure::StructKid;
pub use structure::StructRole;
pub use structure::StructTree;
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).
ink
Ink annotation builder (ISO 32000-1 §12.5.6.13).
measure
Geospatial measure dictionaries (ISO 32000-1 §13.2, Table 261-265).
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.
pdfa
PDF/A conformance validation (profiles A-1b and A-2b).
pdfua
PDF/UA-1 conformance validation (ISO 14289-1).
signature
Digital signature fields (ISO 32000-1 §12.8, ISO 32000-2 + PAdES/ETSI).
structure
Logical structure tree / Tagged PDF (ISO 32000-1 §14.7–14.8). A tagged PDF carries, alongside its page content, a tree of structure elements that describes the document’s logical organization — its headings, paragraphs, lists, tables, figures and their reading order — independent of how that content happens to be laid out on the page. This is what makes a PDF accessible (a screen reader walks the structure tree, not the page) and what lets a consumer recover semantic structure rather than a bag of glyphs.
trust
X.509 certificate-chain verification for PDF signatures, against caller-provided trust anchors.
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