Skip to main content

Module pdf

Module pdf 

Source
Expand description

Document assembly: pages of canvas content, document metadata, and the save path. Pdf is a plain struct — the fields are the composition, and Default fills everything optional.

Structs§

Attachment
A document-level attachment, embedded via the catalog’s /Names /EmbeddedFiles name tree (ISO 32000 §7.11.4). Unlike a page’s painted content, an attachment carries no rendering — only the bytes and the metadata a viewer shows about them.
Bookmark
One outline entry: a title, the page it jumps to, and nested children.
Date
The date type of /CreationDate and /ModDate, shared with the reader crate (pdfboss_core::Date). The writer never reads a clock: dates appear in output only when a caller provides them, keeping builds reproducible. A calendar date and time with a UTC offset: the value of /CreationDate and /ModDate in the document information dictionary, and of every other date string in a file. The writer never reads a clock; dates appear in output only when a caller provides them, keeping builds reproducible.
LinkAnnotation
A clickable rectangle on a page that opens a URI or jumps to a page in the same document (a /Link annotation with a /URI or /GoTo action; ISO 32000 §12.5.6.5, §12.6.4.7, §12.3.2).
Metadata
Document information written to the /Info dictionary. Every field is optional; an all-None value writes no dictionary at all.
Outline
A document’s bookmark panel: an ordered forest of Bookmark nodes, each linking to a page via an explicit /XYZ destination.
Page
One page: its size, rotation, painted content and link annotations.
PageLabel
One labelling range: every page from first_page up to the next range’s first page shows prefix followed by the numeral of start_at + (page - first_page) in style; without a style the label is the prefix alone.
Pdf
A document under construction. The fields are the composition: singleton slots are Options, pages keep the order given.
Viewer
Viewer preferences written to the catalog: initial layout, navigation mode, and the page opened at document start (ISO 32000 §7.7.2).

Enums§

LabelStyle
A page-numbering style, the /S of a page label dictionary (Table 159).
LinkTarget
Where a LinkAnnotation leads.
PageLayout
Initial page-layout mode, written as the catalog’s /PageLayout (ISO 32000 §7.7.2, Table 27).
PageMode
Initial navigation-panel mode, written as the catalog’s /PageMode (ISO 32000 §7.7.2, Table 28).
PageSize
A page size, in default user-space units (1/72 inch), portrait.