Pagination and page breaks
How DocStudio documents continue across pages in print and PDF output: header and footer, page numbers, break settings, table rows and known preview limits.
DocStudio does not implement its own pagination engine. Pagination is done by the browser's print engine, so the Print view and the Chromium PDF share the same page rules.
What continues
When flow content does not fit, it continues on the next page in print and PDF output. A fixed region is never split. The canvas and the screen target show one continuous page.
Header, footer and page numbers
page.header and page.footer repeat on every page. A pageNumber node accepts {n} and {total}, for example Page {n} of {total}. The total is known only to the print or PDF engine, so {total} shows 1 in the screen preview.
Break settings
Every node has a break setting:
{ "id": "summary", "type": "stack", "children": [], "break": { "before": true, "inside": "avoid" } }| Option | Effect |
|---|---|
before |
Start a new page before the node |
after |
Start a new page after the node |
inside |
auto or avoid: allow or avoid breaking inside the node |
In the designer, edit break in the JSON tab. For tables, rowBreak: "avoid" keeps each row whole and repeatHeader repeats the header.
Seeing real pages
Use the Print view in the browser or generate a PDF. The canvas does not simulate page breaks.
Example
The inventory report has 46 rows and continues onto a second page with a repeating header.