Skip to main content

Module pdf_options

Module pdf_options 

Source
Expand description

Page geometry + typography + font bytes for PDF export (via embedded Typst).

Unlike super::docx_options::DocxExportOptions (whose Nones mean “use docx-rs’s own built-in defaults”), a Typst document is compiled from markup this crate emits itself, so there is no “plain” PDF the way to_docx has docx-rs’s defaults — every geometry/typography field here always lands in the generated #set preamble. Default therefore picks concrete, reasonable values (A4, 12pt body text, a modest first-paragraph-less layout) rather than leaving them unset.

Font bytes are supplied by the caller, not looked up here. text-document has no font file access or font-selection policy of its own (see font_bytes) — the caller (e.g. Skribisto’s compiler, which owns the bundled OFL fonts and the writer’s chosen family) hands over raw TTF/OTF blobs, which are passed straight to the embedded Typst compiler’s in-memory font book. No system/typst-kit font search ever runs.

Structs§

PdfExportOptions
Page geometry + typography + embedded font bytes for a PDF export.