Managing Document Page Breaks

Overview

By default, document sections render immediately after one another. To prevent a section from being split across two pages or to start a new chapter, we apply a specific CSS class to the HTML source code of that section.


Let us understand with an Example

Objective

To move a section (e.g., "Order Summary") from the middle of a page to the start of the next page.





Instructions


1. Locate the Target Section

Navigate to your Doc Template record. Under the Related tab, find the Button Sections/Doc Sections list and click the Section Number you wish to move to a new page.



2. Access the HTML Source Editor

Once the specific Section record is open:

Note: Do not simply type in the standard text editor; you must use the "Source" update tool action button ‘Update HTML Content Source’ to modify the underlying code.

3. Apply the Page Break Class

In the pop-up window, you will see the HTML string. You need to identify the first container tag (usually <p> or <div>) and insert the page-break attribute.




Property

Value

CSS Class

page-break-before-always

Placement

Inside the opening bracket of the first tag.




4. Save and Validate

  1. Click Next to confirm the change.
  2. Click Preview Document in the top menu.
  3. Verify that the content now begins on a new page in the PDF viewer.


Best Practices

Formatting Check: Always use the Preview function after a change to ensure the page break hasn't created unnecessary blank pages.

Redirecting you to the article... Click here if you are not redirected automatically.