Skip to main content

Breaks

Insert a break to control where content flows next. The break element is placed directly in the content array alongside other elements.

Break types​

ValueDescription
"page"Start content on a new page
"section"Start a new page-level section, optionally with its own page setup, header, or footer overrides
"line"Insert a line break within flowing content (equivalent to a blank line)

Page break​

Force the following content onto a new page.

{ "break": "page" }

Example: multi-chapter document​

{
"document": {
"styles": {
"title": { "fontSize": 18, "fontWeight": "bold" },
"body": { "fontSize": 10 }
},
"content": [
{ "p": "Chapter 1: Introduction", "style": "title" },
{ "p": "This content appears on the first page.", "style": "body" },

{ "break": "page" },

{ "p": "Chapter 2: Analysis", "style": "title" },
{ "p": "This content starts on a new page.", "style": "body" },

{ "break": "page" },

{ "p": "Chapter 3: Conclusion", "style": "title" },
{ "p": "This content starts on another new page.", "style": "body" }
]
}
}

Use page breaks for:

  • Chapters — start each chapter on a fresh page
  • Cover pages — separate the cover from the body
  • Appendices — isolate supplementary content from the main body
  • Before large tables — ensure a table starts at the top of a page rather than splitting awkwardly

Section break​

Partition the document into page-level sections. Each section can carry its own inline pageSetup (size, orientation, margins, background, borders), header, and footer — all on the break itself. Use it for cover pages, landscape appendices, or any document that needs different page configuration partway through.

{ "break": "section",
"pageSetup": { "size": "LETTER", "orientation": "landscape" }
}

Properties on the inline pageSetup override the document-root pageSetup for every page in this section. Each property is independent: omit a key to inherit it from the root. Omit the pageSetup field entirely to inherit everything.

For the full mechanics — including per-section header/footer overrides — see Page Setup.

Example: landscape appendix​

{
"document": {
"pageSetup": {
"size": "LETTER",
"orientation": "portrait"
},
"styles": {},
"content": [
{
"h1": "Main report"
},
{
"p": "Body of the portrait-oriented report."
},
{
"break": "section",
"pageSetup": {
"size": "LETTER",
"orientation": "landscape",
"margins": [
40,
40,
40,
40
]
}
},
{
"h1": "Appendix A — Wide tables"
},
{
"p": "This section renders in landscape with wider margins."
}
]
}
}

A section break starts a new page when the section's effective page setup differs from the previous section's. If the configuration is identical, the renderer may continue on the same page.

Line break​

Insert vertical spacing between content elements without starting a new page or section.

{ "break": "line" }

Example: spacing between blocks​

{
"document": {
"content": [
{ "p": "Terms and Conditions" },
{ "p": "Please review the following carefully." },

{ "break": "line" },

{ "p": "1. The agreement is binding upon signature." },
{ "p": "2. Termination requires 30 days written notice." },

{ "break": "line" },

{ "p": "Contact legal@acme.com for questions." }
]
}
}

Notes​

  • A page break at the very end of the content array adds a trailing blank page. Avoid it unless intentional.
  • Content that naturally exceeds the page height wraps automatically — you don't need page breaks for overflow. Use them only for intentional structural divisions.
  • section breaks advance to a new page when the section's page setup differs from the previous section's; otherwise the renderer may continue on the same page.
  • line breaks never advance to a new page — they're equivalent to a blank line.
  • A section break is unrelated to the columns element. columns is an inline multi-column layout block; break: section is a page-level partition with its own page setup.