Skip to main content

Module template

Module template 

Source
Expand description

Template expression evaluator.

Takes a template JSON tree (with $ref, $each, $if, operators) and a data JSON object, resolves all expressions, and produces a plain document JSON tree that can be deserialized into a Document and rendered.

This enables a hosted API workflow: store template JSON + dynamic data → produce PDFs without a JavaScript runtime.

Structs§

EvalContext
Evaluation context that holds data and scoped bindings (from $each).

Functions§

evaluate_template
Evaluate a template JSON tree with data, producing a resolved document.