Document
Takes a block
Root of a PDF document: the paper, the margins and what the file says about itself.
Document(page_size: …, size: …, landscape: …) { … }
Example
Document(page_size: "A4") {
Section { Heading("Report").h1 Paragraph("Revenue grew.") }
}
Renders with the class wf-document, stable across releases, so a stylesheet may target it.
| Prop | Type | Meaning |
|---|---|---|
| page_size: | .A4 .A3 .A5 .Letter .Legal |
Paper size (also |
| size: | String |
Paper size: |
| landscape: | Bool |
Turn the paper on its side |
| margin: | Any |
The page margins: one length, or top right bottom left ( |
| title: | String |
The file's title, shown by a reader in place of its name |
| author: | String |
The file's author; several separated by commas |
| subject: | String |
What the document is about |
| keywords: | String |
Comma-separated keywords |
| lang: | String |
The document's language, for screen readers and hyphenation |
Attribute families: global, aria, data. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.
On this entry
Generated, not written
This page comes from the compiler's registry. Edit the registry, not the page — a prop added there shows up here on the next release.
wf registry --json