Changelog
All notable changes to the DocPayload API and document definition schema.
Breaking changes are marked with BREAKING. We announce breaking changes at least 30 days before they take effect.
May 2026
Enum-value casing normalized to lowercase (non-breaking)
textAlign, borderCollapse, verticalAlign, and horizontalAlign values are now consistently lowercase in fixtures and docs ("center", "justified", "collapse", "middle", …). Engine parsers were already case-insensitive, so existing payloads using "CENTER" / "COLLAPSE" continue to render identically — this is a vocabulary cleanup, not a behavior change. Authors writing new templates should use lowercase to match the rest of the JSON enum surface ("portrait" / "landscape", "page" / "section", "butt" / "round" / "square", etc.).
BREAKING — Canvas style property renames (SVG alignment)
Four canvas style properties renamed to match the SVG presentation attributes standard. Authors fluent in SVG / web canvas now author DocPayload canvas styles by ear; the old DocPayload-invented names are no longer recognized.
| Before | After | Maps to SVG |
|---|---|---|
lineDash | strokeDasharray | stroke-dasharray |
lineDashPhase | strokeDashoffset | stroke-dashoffset |
lineCapStyle | strokeLinecap | stroke-linecap |
lineJoinStyle | strokeLinejoin | stroke-linejoin |
Migration: search-and-replace the four JSON keys across your style definitions. Values are unchanged (butt/round/square for cap, miter/round/bevel for join, dash arrays as before). The [0] / [] "reset to solid" convention on strokeDasharray is unchanged.
Engine internals (StyleProperty enum, dispatch tables, handler method names) also renamed; no external API breakage beyond JSON style keys.
April 2026 (v2.4)
New Features
- Table of Contents —
{ "toc": {} }content element auto-generates a TOC from document headings. Clickable links with dotted leaders, right-aligned page numbers, and nested PDF outline bookmarks. Place it anywhere in the content flow — before all content, after a cover page, between sections. Configurable heading levels, title text, and styling. - Custom Fonts — Register TrueType/OpenType font families via the
fontsdocument property. Upload font files through the tenant assets API, then reference by family name in styles. Full 4-variant support (regular, bold, italic, boldItalic) with automatic fallback. Inline[b]/[i]tags use the correct custom font variants. Fonts are embedded in the PDF with full Unicode support. - Array Indexing —
$data.items[0].nameaccesses array elements by index in data injection paths. Works in both$data.*and$item.*contexts. Supports chained indexes ($data.matrix[0][1]), deep nesting ($data.company.bills[3].amount), and graceful fallback for out-of-bounds access.
BREAKING — documentDefinition.dataProvider Removed
The dataProvider property on the root documentDefinition object has been removed from the schema and is no longer accepted.
This property was originally intended to link a document template to an external data source, but was never functional — data injection has always been handled externally at generation time (via the request payload). Any existing payloads using this property should remove it; the value was silently ignored.
BREAKING — Endpoint Renames
| Before | After | Notes |
|---|---|---|
POST /tenants/{tenantId}/documents/generate | POST /tenants/{tenantId}/documents/generate-from-payload | Clarifies that the client sends a full document definition |
POST /tenants/{tenantId}/documents/generate-from-jsonfile | Removed | Use generate-from-payload instead — send JSON in the request body |
Documentation
- Added Tutorials section with 14 complete document examples (invoices, shipping labels, NDAs, forms, and more)
- Added documentation for Encryption, E-Signature, Attachments, Bookmarks, JavaScript Actions, and Layers
- Added Canvas and Paragraphs documentation pages
- All tutorials show Template + Data tabs with rendered PDF previews
New Features
- Heading elements (
h1–h5) — Semantic headings with built-in default sizing (24/18/14/12/10pt). No style definition needed —{ "h1": "Title" }just works. Custom styles override defaults. - Simplified list symbols — Use
"1","a","A","i","I"instead of verbose enum names.{ "ol": { "symbol": "A" } }renders A. B. C. - Input validation — Document definitions are validated before rendering. Unknown properties, type mismatches, and structural errors return a structured
{ code, path, message }response. - JSON Schema — Published at
/docs/schemas/v1/document-definition.schema.jsonfor IDE autocomplete and validation. - Playground schema validation — Real-time validation in the editor with error markers, autocomplete, and hover tooltips.
POST /documents/generate-from-template— Generate PDFs from stored templates with$datainjection- Template
testDatafield — Store test data alongside templates for playground testing
Improvements
[img]shorthand alias for[image]inline tag[color]shorthand alias for[fontcolor]inline tag[size]shorthand alias for[fontsize]inline tag
March 2026
BREAKING — Schema v2
The following properties were renamed for consistency. Update your document definitions accordingly.
| Before | After | Notes |
|---|---|---|
watermark.horizontalSpacing / verticalSpacing | watermark.spacing | Now a [x, y] array matching the margins pattern |
watermark.rotation | watermark.angle | Shorter, unambiguous |
Bug Fixes
- Fixed watermark rendering — watermarks now render on every page via
WatermarkingEventHandler - Fixed watermark
styleproperty not being applied - Fixed canvas
drawArcusing fill+stroke instead of stroke only
Improvements
$datatemplate injection — scalar refs, tabledataProvider+dataMap, listdataProvider, form field defaults- Recursive
$dataresolution across all content types (columns, canvas, watermarks) - 32 new tests (118 total) covering watermarks, canvas, and quickstart guide