RistmarkStart free

Guide

Long content and page breaks

Short documents never break; long ones must. Your sample data might fill one page, and next month's real data fill five. This guide shows the few tools that decide where a page ends, using a report with a summary, a long parts list and closing notes.

The short version

You want… Use…
A heading never alone at the bottom of a page Keep with next on the heading
A small group of blocks to stay together (a signature, a notice) Put them in a Stack and set its Split to Keep together
A section to always start on a fresh page A Page break before it
A long table with its column titles on every page Nothing — a table does this itself
To find out why something moved Page position → Why is this here?

The data and the plan

The report has a title, a few paragraphs, a table of 48 parts from your data, and closing notes. Sample data (shortened — the example uses 48 rows):

{
  "report": { "title": "Quarterly equipment report" },
  "items": [
    { "ref": "P-001", "description": "Component 1, assembled and tested", "qty": 1, "amount": 12 },
    { "ref": "P-002", "description": "Component 2, assembled and tested", "qty": 2, "amount": 15 }
  ]
}

Step 1 — Keep a heading with what follows it

A heading you format inside a longer Text passage (a Heading style within one Text block) is kept with the paragraph under it automatically. A heading that is a Text block of its own, as in this report, needs one switch. Select it and, in the side panel, under Line and Page Breaks, switch Keep with next on: "Keeps this block on the same page as the one after it." If the heading would otherwise land at the very bottom of a page with its paragraph on the next, the heading moves to the next page together with the paragraph.

Keep with next works in the page body, inside a Stack, in a Row column, in a table cell and in a repeating section's design. Use it on every heading, and nowhere else: a chain of blocks that are all "kept with next" must fit on one page together, and if they cannot, the page breaks between them anyway and Page position says so.

Step 2 — Start a section on a new page

Select the last block of the summary, open its menu (⋮ on the block bar, or right-click) and choose Insert page break below — or press Ctrl+Enter (⌘+Enter on a Mac). The next block, the "2. Parts list" heading, now begins a fresh page.

A page break ends the page wherever it is, whether or not there is room left. It is right for "the parts list always starts on its own page" and wrong for "I want to avoid an awkward break": for that, use Keep with next. A page break works only directly on the page — not inside a Stack, a Row column, a table cell or a header or footer; the editor refuses to put one there and says why.

Step 3 — Let the table run long

Add a Table, choose the list items as its Data path, and connect the columns (see Build an invoice). Nothing more is needed for length: a table that runs past the bottom of a page continues on the next one and repeats its header row there. A data-filled table breaks between whole rows, never through the middle of one. If you use repeating rows (a design of several rows per record), a record breaks between records, and a record too tall for any page breaks between its own rows with the header repeated above the next part.

Step 4 — Keep a signature or notice whole

For a block of several pieces that must never be torn — a signature block, a "do not copy" notice — put the pieces in a Stack and set its Split option to Keep together. If it does not fit in the space left, the whole Stack moves to the next page. The default, Allow page breaks between items, lets the break fall between two of the Stack's pieces.

Step 5 — Check how it breaks

A document breaks differently for different data. Test with realistic extremes:

  • In Manage data, create a scenario with many records and one with none (see Fields and bindings, Test scenarios), then switch between them.
  • Check scenarios in Preview lists, scenario by scenario, which blocks no longer fit or now run across more pages.
  • Select any block and read Page position → Why is this here? — "Moved to page 2 — because a page break comes before it", "Split across pages 1–2", and the one change that would put it back.

What you should see

Three pages. Page 1 holds the title, "1. Summary" and its two paragraphs. Page 2 starts with "2. Parts list" and the table, running from P-001 to about P-041. Page 3 starts with the table header again ("Ref", "Description", "Qty", "Amount"), continues with the last rows, and ends with "3. Closing notes" and its paragraph. All three headings sit on the same page as the paragraph or table that follows them.

Variations

  • No forced break. Remove the page break and the parts list starts straight after the summary, on page 1, and breaks wherever the page runs out.
  • An appendix that only sometimes exists. Put it in its own section (see Sections) and give that section a visibility condition; when the rule is false, none of its pages print.
  • Page numbers. Put "Page {{ $page.number }} of {{ $page.count }}" in the footer (see Letterhead and footer).

Output differences

PDF and HTML break where the editor's preview breaks. Word is an editable document laid out by Word itself, so a page may break at a slightly different place; the forced page breaks are kept, and a table's header rows are marked as header rows in the Word table.

If something looks wrong

  • A heading is alone at the bottom of a page. Keep with next is off on that heading, or the heading is inside something that ignores it. Select the heading and check Line and Page Breaks.
  • A page is nearly empty. A page break fired near the top, or a block that cannot split (a picture, a QR code, a Stack set to Keep together) did not fit in the space left and moved whole. Page position names which.
  • Keep with next is on but the page still breaks. The block and the one after it are together taller than a page; the editor says "too tall to fit on one page together" and breaks anyway.
  • My page break does nothing. It sits inside a container (a template written outside the editor can carry one there), it comes before anything else on its page, or the page break before it already ended the page. The page break's own panel says which.
  • A paragraph starts as a single line at the foot of a page. A Text block starts at the bottom of a page only if at least 2 lines fit there, unless you changed the number under Page split in its side panel; raise it to be stricter.

See Page break, Stack, Table and Why is this here? for each tool in full.

The report from this guide is kept as the tested example long-content-1; it is checked automatically to lay out and produce PDF, Word and HTML without errors.