In order to control pagebreaks, it is possible to let Scroll PDF Exporter enter pagebreaks at certain landmarks. You can also add pagebreaks in your Confluence pages. For more information, see Adding page breaks.
In the default template, pagebreaks are inserted before every heading 1 (in the CSS described as "section-1"):
Before you begin: To enforce pagebreaks, a template must exist.
To enforce pagebreaks:
- Open your template and click Content Formatting.
- You can now edit the pagebreaks:
- To add a pagebreak before each heading 2, enter the following lines of code:
- To disable enforced pagebreaks before heading 1, enter the following lines of code:
- To avoid pagebreaks inside a paragraph, enter the following lines of code (this example refers to the paragraph 'nobreak'):
- To suppress page breaks before heading 1 but keep them after the title page and TOC page, add the following lines of code:
Please note that 'toc' and 'content' are the CSS classes as defined in the static pages section in the template designer.
- To enforce a page break in the TOC after every heading 1, enter the following lines of code:
- To enforce a page break for every new Confluence page enter the following lines of code:
- To avoid a page break between figures and captions enter the following lines of code:
- Click Save.
The pagebreaks are inserted in the wanted positions.
For more information see Page breaks in the W3C website.