Structure
A template is rendered with POST /render/template. The request body has two top-level
fields:
template— the document definition (required). See its fields below.data— per-block content overrides keyed by block id. Use this to render the same template with different content.
The template object is built from these fields:
version— schema version of the template format.config— document-wide settings:title— the PDF document title (required by PDF/UA). Defaults toDocument.page—size,locale,margins,pageNumbers, optionalbackground, and repeatingfooterrows.typography— default fontfamily,size,weight,align, andcolor. Inherited by every block unless overridden on the block’s ownconfig.typography.embedColorProfile— defaults totrue; set tofalseonly when you need PDF/UA output without the PDF/A color profile, for example benchmark size comparisons.
fonts— optional map of custom font families to load by URL. See External Fonts.attachments— optional PDF/A-3 file attachments embedded into the output.rows— the ordered list of rows that make up the body of the document. Each row contains one or moreblocksthat lay out side by side using each block’sconfig.width.
A block belongs to one of the following types. All of them carry a common config for
typography, spacing, width, and alignment:
text— paragraph copy.heading— a heading at a configurable level.table— a table built from rows of typed cells, with automatic pagination.image— an inline image referenced by URL or data URI.key-value— labelled key/value pairs, typically used for invoice metadata.divider— a horizontal rule with configurable style (solid,dashed,dotted,double,none).spacer— vertical whitespace.html— a raw HTML escape hatch when nothing else fits.
Edit the JSON and click Render PDF.