Skip to main content

Page Break Element

The pageBreak element lets you manually start a new page in a flow of content and optionally change the page orientation.

Page Break Properties & Defaults

Page Break Element Properties

PropertyTypeRequiredDescriptionDefault
typestringElement type: pageBreak-
orientationstringPage orientation after the break: portrait or landscape-

Page Break Defaults (defaults)

There are no dedicated element-level defaults for pageBreak in the schema. Page breaks work together with the document-level layout settings:

  • document.orientation controls the overall page orientation (portrait or landscape).
  • Each pageBreak can optionally set orientation on that break to change the orientation for subsequent pages.
PropertyTypeDescription
document.orientationstringGlobal page orientation: portrait or landscape.
document.sizestringPage size: A4, A3, A5, Letter, or Legal.
document.marginTop / document.marginRight / document.marginBottom / document.marginLeftnumberPage margins in cm (0-10).

Page Break JSON Example

The following example shows a simple document with two page breaks. The first break switches to landscape, the second switches back to portrait:

{
"document": {
"type": "pdf",
"filename": "page-break-example",
"orientation": "portrait"
},
"sections": [
{
"type": "flow",
"content": [
{
"type": "h1",
"text": "Page 1 - Introduction"
},
{
"type": "text",
"text": "This is the first page in portrait orientation."
},
{
"type": "pageBreak",
"orientation": "landscape"
},
{
"type": "h1",
"text": "Page 2 - Landscape Report Section"
},
{
"type": "text",
"text": "This page is laid out in landscape orientation after the first page break."
},
{
"type": "pageBreak",
"orientation": "portrait"
},
{
"type": "h1",
"text": "Page 3 - Back to Portrait"
},
{
"type": "text",
"text": "This page switches back to portrait orientation after the second page break."
}
]
}
]
}