Skip to main content
A full invoice, broken down. Copy the template and data below into POST /generate (or the playground) and it renders as-is. Then swap in your own data shape. It exercises most of the language: a row header, side-by-side address columns, a forEach line-item table, a totals block, and a richText page-number footer.

Template

Data

How it’s built

1

Header — a two-cell row

A row splits into a flexible left cell (brand) and a fixed 180 pt right cell (invoice metadata, right-aligned). Because header sits on page, it repeats if the invoice runs to a second page.
2

Addresses — two columns side by side

Another row of two equal relative cells, each a column of text. The right one is right-aligned so the two blocks frame the page.
3

Line items — a forEach table

The table has four columns. Its body.forEach is "invoice.lines", so it renders one row per line item, with {{item.…}} pulling each line’s fields. A heavier rule under the header, a hairline under each row.
4

Totals — plain text, pre-computed

Subtotal, VAT, and total are ordinary right-aligned text nodes. Tipar does no arithmetic — subtotal, vat, and total arrive already computed and formatted in data. See why.
5

Footer — page numbers

A richText footer prints Page X of Y using the pageNumber and totalPages spans, centered.
Add more entries to invoice.lines and the table grows; overflow onto a second page paginates automatically, re-drawing the header row and incrementing the footer’s page count.

More templates

Receipt, certificate, contract, and a multi-page report.