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
| Property | Type | Required | Description | Default |
|---|---|---|---|---|
type | string | ✓ | Element type: pageBreak | - |
orientation | string | ✗ | Page 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.orientationcontrols the overall page orientation (portraitorlandscape).- Each
pageBreakcan optionally setorientationon that break to change the orientation for subsequent pages.
Related Document Properties (dot notation)
| Property | Type | Description |
|---|---|---|
document.orientation | string | Global page orientation: portrait or landscape. |
document.size | string | Page size: A4, A3, A5, Letter, or Legal. |
document.marginTop / document.marginRight / document.marginBottom / document.marginLeft | number | Page 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."
}
]
}
]
}