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 /EmbeddedFilesname 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
- A calendar date and time with a UTC offset, for
/CreationDateand/ModDate. The writer never reads a clock — dates appear in output only when a caller provides them, keeping builds reproducible. - Link
Annotation - A clickable rectangle on a page that opens a URI or jumps to a page in
the same document (a
/Linkannotation with a/URIor/GoToaction; ISO 32000 §12.5.6.5, §12.6.4.7, §12.3.2). - Metadata
- Document information written to the
/Infodictionary. Every field is optional; an all-Nonevalue writes no dictionary at all. - Outline
- A document’s bookmark panel: an ordered forest of
Bookmarknodes, each linking to a page via an explicit/XYZdestination. - Page
- One page: its size, rotation, painted content and link annotations.
- Page
Label - One page-numbering range, taking effect from
first_page(0-based) until the next range’sfirst_pageor the document’s end (ISO 32000 §12.4.2). A document’spage_labelsmust include a range withfirst_page == 0whenever it is non-empty. - 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§
- Label
Style - A page-numbering style for a
PageLabelrange, written as its/S(ISO 32000 §12.4.2, Table 159). - Link
Target - Where a
LinkAnnotationleads. - Page
Layout - Initial page-layout mode, written as the catalog’s
/PageLayout(ISO 32000 §7.7.2, Table 27). - Page
Mode - Initial navigation-panel mode, written as the catalog’s
/PageMode(ISO 32000 §7.7.2, Table 28). - Page
Size - A page size, in default user-space units (1/72 inch), portrait.