Skip to main content

Page Preferences (PDF)

When you publish to PDF, Paligo uses the settings in the PDF layout to determine the page size, orientation, and other page-related properties.

Use page breaks to control how Paligo allows content to flow from one page to the next. They are only relevant to printed outputs, such as PDF, and do not apply to digital formats such as HTML or HTML5.

Paligo handles page breaks automatically during the publishing process. It uses a set of default rules for page breaks, which make sure that certain elements are kept together. For example, titles are always kept on the same page as the next element, which is usually the first paragraph of a topic. 

But there may be times when you want page breaks to be handled differently. For those situations, we recommend that you use the PDF Layout to set:

  • Soft page breaks

    These are breaks that only apply to topics when the content is too large to fit on a single page.

  • Section Page Breaks

    These are breaks that apply to all Level 1 topics and/or all Level 2 topics. With these, the idea is that you apply page breaks consistently to all topics at the top level or second level in your publication structure.

It is also possible to set Hard Page Breaks, which are fixed breaks that always occur, no matter where the topic appears. We recommend that you avoid using hard breaks and use soft page breaks and section page breaks instead. But you may prefer to use hard page breaks in certain circumstances, and Paligo does support that.

Soft page breaks allow you to control how elements break across the end of a page or column. For example, you can set example elements to always remain intact, so that the entire example is shown on a single page and cannot break across two pages.

During publishing Paligo will apply soft page breaks automatically, but these may not match your requirements. For greater control, you can use your PDF Layout to set your own soft page breaks. The PDF Layout has Keep-together options which let you choose page break preferences for most of the commonly used elements.

Note

Industry best practice is to rely on the Layout settings for controlling your page breaks. But be aware that it is also possible to use keep-together attributes to apply page breaks on specific elements. These attributes are intended for use only in exceptional circumstances, where you need a particular element to break across a page differently.

Set Page Break Rules in the PDF Layout

To use the PDF Layout settings to define the page break rules:

  1. Select Layout and then select the PDF Layout you are going to use for publishing. Alternatively, you can create a new PDF Layout (see Create a Layout).

  2. Select Keep-together options.

    The Keep-together options include settings for a range of commonly used elements. For example, para/@keep-together is for setting the rules for paragraph elements, table/@keep-together is for table elements, tr/@keep-together is for table row elements and so on.

  3. Use the settings to control what happens to each type of element if it cannot fit at the end of a page or column. You can choose from:

    • Yes - Paligo will try to keep the element together, on one page. This is not always possible to achieve because of the amount of space possible. If there is not enough space, Paligo will put part of the element on the next page.

    • No - Paligo will allow an element to break across a page. The first part of the element will be on one page and, if there is no space for the rest of the element, the second part is moved to the next page.

    • Always - Paligo will force the element into the available space. This can result in the element crossing into the footer and may even go beyond the page boundary.

    • Default to inherit the value for this setting from the base Layout. The base Layout is either a built-in Layout provided by Paligo or another custom Layout, see Layout Relationships - Base, New, Duplicate.

    ordered-list-keep-together.png

    For an example that shows the effect of a keep-together page break, see Example Soft Page Breaks.

  4. Repeat the previous step for each setting, as required.

  5. Select Save.

When you publish with this Layout, Paligo will apply the keep-together rules you have set.

Note

If there are any elements that have keep-together attributes, those attribute settings will take priority over the Layout settings (see Set Page Breaks with "keep-with" Attributes).

Set Page Breaks with "keep-with" Attributes

We strongly recommend that you use the PDF Layout settings to control the page breaks in your content. This keeps formatting and content separate, which is an important concept in Paligo. But in certain situations, you may need an element to break differently. In those exceptional cases, it is possible to use the keep-together and keep-with-next attributes to apply different soft page breaks.

  1. Position the cursor in the element that you want to control.

    If content consists of several nested elements, you should select the outermost element. For example, an image has mediaobject > imageobject > imagedata and you should apply the attribute setting to the mediaobject element.

  2. Select the element in the Element Structure Menu and choose Go to element.

  3. In the Element Attributes Panel, select Add attribute and then add the element you want to use:

    element-attributes-keeptogether.png
    • xinfo:keep-together

      This attribute lets you control how the element breaks on to the next page.

      Set the attribute value to yes to start the element on a new page (if the element does not fit on the current page). Set the value to no to allow the element to break across pages. This is the default setting.

    • xinfo:keep-with-next

      This attribute lets you control whether an element stays on the same page as the next element.

      Set the attribute value to yes to make the element appear on the same page as the next element in the content. Set the value to no to allow the element and the next element to be on different pages.

    For examples that show how the keep-together and keep-with-next attributes affect the output, see Example Soft Page Breaks.

  4. Select Save. Save icon.

When you publish your content to PDF, Paligo will apply the page break attributes you have set. These will take priority over the settings in your PDF Layout.

Example Soft Page Breaks

The following examples show the effects of keep-together and keep-with-next soft page breaks.

Example 4. Page break with "keep-together" attribute in place

Let's say you have a numbered list (orderedlist) on page 4 and it flows onto page 5. When you publish to PDF, if the list is too large to fit on a single page, it will flow across as many pages as needed. This is because, in the PDF Layout, orderedlist/keep-together is set to No by default.

You edit your PDF Layout, go to the Keep-together Options and set orderedlist/@keep-together to Yes. When you publish with the Layout, the list will start on page 5 (if it is too long to fit on page 5, it will flow to page 6).

Caution

Do not use the value "always" as this could cause the list to continue beyond the page border.

list-breaking-over-page.png

orderedlist/@keep-together set to No

list-entire-on-next-page.png

orderedlist/@keep-together set to Yes

Note

You could achieve the same effect with an xinfo:keep-together attribute, but it is better to manage the page breaks on the Layout wherever possible.

Another scenario is if the list is too long to fit on an otherwise empty page. In this situation:

  • orderedlist/@keep-together set to No results in the list starting in the flow of the other text and continuing on to the following page(s).

  • orderedlist/@keep-together set to Yes results in the list starting on the next page after the previous text. It will then continue on to the following pages. This can sometimes cause large gaps on pages.

PDF double page spread. On the left page is 2 paragraphs followed by a 54 step procedure. Steps 1 to 36 are on the left page and steps 37 to 54 are on the right page.

orderedlist/@keep-together set to No

PDF double page spread. On the left page is 2 paragraphs followed by a blank space. The 54 step procedure starts on the next page and as there is not enough space for the entire list, runs on to the page after that.

orderedlist/@keep-together set to Yes. Note that the list starts on the next page and will continue on to further pages.


Example 5. Page break with "keep-with-next" attribute in place

Let's say you have a document that has an image immediately followed by another image. The images are mediaobject elements. When you publish to PDF, the first image is on page 4 and the second image is on page 5, but you want both images to display on the same page. To do this, you set the xinfo:keep-with-next attribute for the first mediaobject element to yes. This tells Paligo to keep the first mediaobject element with the element that follows it.

2-images-keep-with-next-no.png

xinfo:keep-with-next attribute set to no.

2-images-keep-with-next-yes.png

xinfo:keep-with-next attribute set to yes.

Note

If you use the xinfo:keep-with-next attribute on a paragraph element, Paligo will keep the last two lines of the paragraph on the same page as the next element. (This is because the default setting for orphans is 2 lines).


If the sections in your PDF are insufficiently spaced out, it can make your document look cluttered and make it more difficult to read. One way to resolve this issue is to use section page breaks. These are forced page breaks that appear before or after sections that are positioned at level 1 or level 2 in your publication structure. By having these sections on separate pages, it can mean there is extra white space between your sections, making the document easier on the eye.

For example, here is a double-page spread with no section breaks in place. Level 2 sections can break across the page and the next Level 2 section can be on the same page as the previous one.

section-break-not-in-place.png

With a "Page break after section" in place, the second Level 2 section is pushed on to the next page. This creates more white space at the end of the previous Level 2 section.

section-break-in-place.png

To apply (or remove) section breaks to all sections at level 1 or level 2 in the publication structure:

  1. Select Layout and then select the PDF Layout you are going to use for publishing. Alternatively, you can create a new PDF Layout (see Create a Layout).

  2. Expand Section Titles in the sidebar.

  3. Select Level 1 or Level 2, depending on the level you want to control.

  4. To control breaks immediately before your sections, use Ensure a page break before the section:

    Ensure_Page_Break_Before_Section_small.jpg

    Choose:

    • Auto - For no page breaks before sections at this level*. Default for Level 2.

    • Column - In a multi-column layout, each section at this level will start in a new column.

    • Page - To add a page break before each section at this level*. Default for Level 1, if single-sided.

    • Even-page - Each section at this level* will start on an even-numbered page.

    • Odd-page - Each section at this level* will start on an odd-numbered page. Default for Level 1, if double-sided.

    * Where the level is 1 or 2, depending on whether you are editing the Level 1 or Level 2 settings.

  5. To control breaks after your sections, use Ensure a page break after the section:

    Ensure_Page_Breake_After_Section_small.jpg

    Important

    Normally, we recommend that you do not change this setting. Instead, use the setting Ensure a page break before the section.

    Choose:

    • Auto - For no page breaks after your sections. Default.

    • Column - In a multi-column layout, the next section at the same level* will start in a new column.

    • Page - To add a page break after each section at this level*.

    • Even-page - The next section at the same level* will start on an even page.

    • Odd-page - The next section at the same level* will start on an odd page.

    * Where the level is 1 or 2, depending on whether you are editing the Level 1 or Level 2 settings.

  6. Select Save.

Note

By default, Paligo adds blank pages in double-sided documents to satisfy break requirements. If needed, this feature can be deactivated, see Include or Exclude Blank Pages (PDF).

A hard page break is a fixed break that you can apply to a topic (the topic's section element, specifically). When in place, it forces the entire topic to appear on a new page, even if there is enough space to fit it on the previous page.

a 2 page spread in a PDF document. Topic 1 is rendered on the left page. There is enough space on the left page to fit Topic 2 as well, but the hard page break means Topic 2 starts on the right page instead.

Important

Hard page breaks are always in a fixed position. The page breaks always happen at that point, no matter where the topic is used. This can be a problem if you reuse a topic in multiple publications or if you translate your content. In those situations, the fixed page break can occur in an awkward position or may result in large amounts of white space.

We recommend that you avoid Hard Page Breaks and use Soft Page Breaks and Section Page Breaks instead.

If you really want to use a hard page break, the following steps explain how to do it. But be aware that it will cause the topic to always start on a new page, no matter where it is used.

  1. Select the topic or component in the Content Manager to open it in the Editor.

    Content Manager in Paligo. It shows the Documents section contains an Acme 100 Topics folder. Inside the folder there is a publication and many topics, including "Connect to Network (100).

    Alternatively, you can Create a Topic and edit that.

  2. Select the section element in the Element Structure Menu.

    Close up of Element Structure Menu. It shows the section element is selected and the Go to element option is selected.
  3. Select Go to element.

  4. Add the xinfo:pagebreak attribute in the Element Attributes Panel.

    hard-pagebreak.png
  5. Set the value to before. This will add a hard page break before the selected section.

    There are other options for the attribute, but "before" is the most commonly used.

  6. Select Save. Save icon.

  7. Repeat this procedure for every topic that you want to have a hard page break before it.

Note

The xinfo:pagebreak attribute does exist on other elements, but is only supported to allow potential customization.