Skip to main content

Module template_parser

Module template_parser 

Source
Expand description

XDP template XML → FormTree parser.

Reads the <template> packet from an XFA XDP document and builds a FormTree suitable for LayoutEngine::layout().

XFA Spec 3.3 §2.1 — Form Structural Building Blocks: Container elements: subform, field, draw, exclGroup, area Page-level: pageSet, pageArea, contentArea, medium Metadata: caption, value, ui, font, border, margin, para

XFA Spec 3.3 §2.2 — Basic Composition: Measurements use absolute units (in, cm, mm, pt) with inches as default. Dimension strings (“0.5in”, “72pt”, “10mm”) are converted to PDF points via Measurement::parse.

Functions§

parse_template
Parse a <template> XML packet into a FormTree.