Skip to main content

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.


July 2026

BREAKING — Canvas fully adopted into SVG

Vector drawing is now authored entirely as SVG. A canvas is a single svg block that reads like an <svg> root — element names and properties mirror SVG, and an icon or snippet transfers with minimal translation.

{ "svg": { "viewBox": [0, 0, 24, 24], "width": 24, "children": [ { "path": { "d": "…", "style": "ink" } } ] } }

Removed:

  • The shapes array form (Content-level shapes + sibling viewBox / padding). Use the svg block with children.
  • padding. For breathing room around auto-sized art, author an explicit viewBox.

New / changed:

  • viewBox now lives inside the svg block — still a numeric array, [W, H] or [minX, minY, W, H] (same convention as table / columns widths). Omit it to auto-derive the tight box from the children — now including path and textPath curves, which are flattened into the box, so curve art auto-sizes too.
  • width / height (points) set the rendered display size while viewBox stays the coordinate space — so a pasted icon keeps its native d and viewBox and just gets a size (e.g. a 0 0 1024 1024 glyph with "width": 24). Give one to scale uniformly, or both.
  • Schema definition renames: CanvasCommandSvgElement, CanvasImageShapeSvgImageShape, CanvasBarcodeShapeSvgBarcodeShape. Tooling that references these $ref names should update.

Migration:

  1. Wrap shapes in { "svg": { "children": [ … ] } }.
  2. Move the sibling viewBox array inside the svg block (it stays a numeric array — no conversion).
  3. Drop padding — set an explicit viewBox if you relied on it for margin.
  4. Inside a g group, use children (not shapes).

Styling is unchanged — SVG presentation attributes via named styles (see the May 2026 property renames).


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", "justify", "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 — SVG style property renames (SVG alignment)

Four SVG style properties renamed to match the SVG presentation attributes standard. Authors fluent in SVG / web SVG now author DocPayload SVG styles by ear; the old DocPayload-invented names are no longer recognized.

BeforeAfterMaps to SVG
lineDashstrokeDasharraystroke-dasharray
lineDashPhasestrokeDashoffsetstroke-dashoffset
lineCapStylestrokeLinecapstroke-linecap
lineJoinStylestrokeLinejoinstroke-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.

No other changes: beyond these four JSON style keys, documents render exactly as before.


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 fonts document 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].name accesses array elements by index in Data Binding 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.

BREAKINGdocumentDefinition.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 Binding 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

BeforeAfterNotes
POST /tenants/{tenantId}/documents/generatePOST /tenants/{tenantId}/documents/generate-from-payloadClarifies that the client sends a full document definition
POST /tenants/{tenantId}/documents/generate-from-jsonfileRemovedUse 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 SVG and Paragraphs documentation pages
  • All tutorials show Template + Data tabs with rendered PDF previews

New Features

  • Heading elements (h1h5) — 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.json for 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 $data binding
  • Template testData field — Store test data alongside templates for playground testing

Improvements

  • [img] shorthand alias for the [image] Shortcode
  • [color] shorthand alias for the [fontcolor] Shortcode
  • [size] shorthand alias for the [fontsize] Shortcode

March 2026

BREAKING — Schema v2

The following properties were renamed for consistency. Update your document definitions accordingly.

BeforeAfterNotes
watermark.horizontalSpacing / verticalSpacingwatermark.spacingNow a [x, y] array matching the margins pattern
watermark.rotationwatermark.angleShorter, unambiguous

Bug Fixes

  • Fixed watermark rendering — watermarks now render on every page via WatermarkingEventHandler
  • Fixed watermark style property not being applied
  • Fixed SVG drawArc using fill+stroke instead of stroke only

Improvements

  • $data template binding — scalar refs, table dataProvider + dataMap, list dataProvider, form field defaults
  • Recursive $data resolution across all content types (columns, SVG, watermarks)
  • 32 new tests (118 total) covering watermarks, SVG, and quickstart guide