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§

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.
Node
A node in the document tree.
PageConfig
Configuration for a page: size, margins, orientation.
SignatureConfig
Configuration for digitally signing a PDF with an X.509 certificate.
SourceLocation
Source code location for click-to-source in the dev server inspector.
TextRun
An inline styled run within a Text node.

Enums§

CanvasOp
A canvas drawing operation.
ColumnWidth
EdgeValue
A margin edge value — either a fixed point value or auto.
FixedPosition
Where a fixed element is placed on the page.
NodeKind
The different kinds of nodes in the document tree.
PageSize
Standard page sizes in points.
PdfAConformance
PDF/A conformance level.
Position
Positioning mode for a node.