Page Breaks
In Heretto PDF Generator, you can control page breaks and how elements are distributed over multiple pages. Follow information provided in this section to build PDF Generator publishing scenarios based on Gray and Color templates. For more information about the templates, see Gray and Color Templates.
Resource location: | @import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/modules/layout/breaks.css"); |
Distribute Non-Chapter-Level Topics Without Page Breaks
You can avoid adding breaks between topics to save space. By default, if a topic fits a page, it is distributed without any page breaks.
Topics that are added below chapter-level are distributed without page breaks. This saves space in your publication.
Decide Which Elements Should Be Broken Over Multiple Pages
You can decide which DITA elements are broken over multiple pages.
DITA elements are broken or not broken over multiple pages according to what you defined in the CSS.
Prevent Breaking Definition Title and Definition Description Elements
You can prevent breaking the definition title and definition description elements over multiple pages. To do that, you need to modify both your CSS and XSLT code in a PDF Generator scenario.
In the definition lists, the titles and descriptions are not broken over multiple pages.
Outputclass Attributes for Page Breaks
You can assign outputclass attributes to the DITA elements inside the topics. This enables you to configure how the specific elements are broken.
You can learn how to assign outputclass attributes here: Outputclass Attributes for PDF Generator.
With outputclass attributes, you can make this change to individual maps or topics, regardless of what is defined in the publishing scenario.
Outputclass Attribute | Description |
Target DITA Element |
---|---|---|
break_before |
Forces a break before an element |
topic, element inside a topic |
break_after |
Forces a break after an element |
topic, element inside a topic |
break_avoid |
Prevents breaking the element |
element inside a topic |
break_inside |
Breaks the element over multiple pages |
element inside a topic |
break_topics |
Distributes non-chapter-level topics one-by-one over multiple pages. The same as: Distribute Non-Chapter-Level Topics Without Page Breaks. |
map |