Skip to main content

Module model

Module model 

Source
Expand description

§Document Model

The input representation for the rendering engine. A document is a tree of nodes, each with a type, style properties, and children. This is designed to be easily produced by a React reconciler, an HTML parser, or direct JSON construction.

The model is intentionally close to the DOM/React mental model: you have containers (View), text (Text), images (Image), and tables (Table). But there is one critical addition: Page is a first-class node type.

Structs§

Attachment
A file embedded as a PDF attachment (associated file).
CertificationConfig
Configuration for digitally certifying a PDF with an X.509 certificate.
ChartDataPoint
A data point for bar charts and pie charts.
ChartSeries
A data series for line charts and area charts.
ColumnDef
Column definition for tables.
Document
A complete document ready for rendering.
DotPlotGroup
A group of data points for dot plots.
Edges
Edge values (top, right, bottom, left) used for padding and page margins.
FontEntry
A custom font to register with the engine.
MarginEdges
Margin edges that support auto values.
Metadata
Document metadata embedded in the PDF.
NamedPageSet
The page-config family for one named page (CSS @page <name>).
Node
A node in the document tree.
PageConfig
Configuration for a page: size, margins, orientation.
RedactionPattern
A text pattern to search for in a PDF for redaction.
RedactionRegion
A rectangular region to redact in an existing PDF.
SourceLocation
Source code location for click-to-source in the dev server inspector.
TextRun
An inline styled run within a Text node.
ZugferdMeta
Factur-X / ZUGFeRD XMP identification (the fx: extension schema).

Enums§

AfRelationship
/AFRelationship values (PDF 2.0 §14.13, used by PDF/A-3).
BackgroundPosition
Where a background image is positioned on a page (relevant for cover / contain when the image doesn’t fill the page exactly).
BackgroundSize
How a background image is scaled to fit a page.
CanvasOp
A canvas drawing operation.
ColumnWidth
EdgeValue
A margin edge value — either a fixed point value or auto.
FixedPageFilter
Which pages a fixed element repeats on.
FixedPosition
Where a fixed element is placed on the page.
ListMarkerType
Marker style for a List. Maps to CSS list-style-type:
NodeKind
The different kinds of nodes in the document tree.
PageSize
Standard page sizes in points.
PatternType
How to interpret a text pattern for redaction search.
PdfAConformance
PDF/A conformance level.
PdfVersion
The output PDF version. The 1.7 arm is the writer as it has always been; every 2.0 behavior lives behind explicit V2_0 match arms so the default path is textually unchanged.
Position
Positioning mode for a node.