For individual article PDFs as well as the standard and custom PDF export options, sometimes a page break comes between two chunks of content you'd like to stay together (such as a numbered step and the screenshot that goes with that numbered step).
If you'd like to be able to enforce a page break before or after certain portions of an article, you can create a snippet that will force a PDF page break.
To do so:
- Go to Library > Snippets.
- Click on the + Create New Snippet button.
- This will open a new page where you can define your snippet.
- Be sure to give it a Snippet Name. Here, we use "PDF Page Break After."
- The merge code will be automatically generated based on the snippet name.
- Add a Snippet Description to explain what this snippet does. For example: "Add this snippet anywhere in individual articles where you'd like to force a page break in the PDF exports."
- In the Snippet Editor, be sure Code Editor is selected from the dropdown.
- Copy the code below and paste it into the Code Editor. This code creates an empty paragraph with CSS to force a page break after it:
- Click the Create button. Your completed snippet should look something like this:
- Now that your snippet exists, use the Insert Snippet option in the editor to add the snippet into any article where you'd like the page break to occur.