Fix table pagination, headers and footers
A table that fits the sample invoice can break across pages once an order has dozens of lines. Test the exact page size and margins with long descriptions and at least 100 rows.
Structured layouts
Use one array entry per table row. The Typst renderer repeats the column headings and applies the running header and footer on each page. Long text wraps inside a cell. Split unusually tall entries into multiple rows. Choose landscape for wide tables. Check the final line item and page count after downloading.
HTML layouts
Use semantic table headings and allow the table itself to fragment. An oversized row can still span pages. For a deliberate section break, put the break on the next section.
<style>
thead { display: table-header-group }
tr { break-inside: avoid }
section.appendix { break-before: page }
</style>
<table><thead><tr><th>Item</th><th>Qty</th></tr></thead>
<tbody><tr><td>Print consultation</td><td>2</td></tr></tbody></table>
<section class="appendix">Delivery notes</section>
Use at least 12 mm top and bottom margins for running text. Set the header and footer in the API page object. Try the HTML tool.