Snippet to force page breaks in PDFs

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, create a snippet that will force a PDF page break and then add that into articles wherever you want to force the page break.

To create the snippet:

  1. In the lefthand navigation, go to  Snippets. The Snippets page opens.
  2. Select + Create New Snippet. If you're unfamiliar with creating snippets, refer to Create a snippet for more detailed instructions.
  3. Enter a Snippet Name, like PDF Page Break After.
  4. Enter a Snippet Description to explain what this snippet does, like Add this snippet anywhere in individual articles where you'd like to force a page break in the PDF exports..
  5. Select the Snippet Content dropdown and select Code Editor:
  6. 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:
    <p style="page-break-after:always;"></p>
  7. Select Create to finish creating your snippet.

Now that your snippet exists, use the Insert Snippet option in the editor to add the snippet into the place in any article where you'd like the page break to occur. Refer to Add snippets in content for more detailed instructions.

The Insert Snippet control in the editor