Gretyl's Portal

Heretto Help

Show Page Sections

Columns

In Heretto PDF Generator, you can lay out elements in multiple columns on a page. 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.

You can decide which elements are divided into columns with outputclass attributes. You can style how the columns look with CSS.

Note:

By default, some elements, such as titles, span across every column. For more information, inspect the template code.

Table 1. Styling used in the default Gray and Color templates
Resource location:@import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/modules/layout/columns.css");

Add Border Between Columns

You can add borders between the columns.

  1. In the top-left corner, click the Main Menu and go to PDF Generator.
  2. In the PDF Generator scenarios screen, click the publishing scenario you want to edit.
  3. In the CSS tab, add this code.
    /* Add borders between columns */
    .two_column,
    .three_column,
    .four_column {
      column-rule: 2px dashed darkgray;
    }

    Customize the border thickness and color by assigning values to column-rule.

  4. Click Save Scenario.
  5. Click the Select map to preview button to select the map you want to test with the updated scenario. Once selected, click the Generate PDF button.

Columns are divided by borders.

border between columns

Adjust the Gaps Between Columns

You can adjust the gaps between the columns.

  1. In the top-left corner, click the Main Menu and go to PDF Generator.
  2. In the PDF Generator scenarios screen, click the publishing scenario you want to edit.
  3. In the CSS tab, add this code.
    /* Adjust the gaps between columns. */
    .two_column,
    .three_column,
    .four_column {
      column-gap: 60px;
    }

    Customize the gap by assigning values to column-gap.

  4. Click Save Scenario.
  5. Click the Select map to preview button to select the map you want to test with the updated scenario. Once selected, click the Generate PDF button.

The gap between the columns has the assigned width.

Outputclass Attributes for Columns

You can assign outputclass attributes to elements inside the topic to divide them into columns.
Tip:

For Heretto PDF Generator, when laying out content in multiple columns, consider using the landscape page orientation. For more information, see Page Orientation, Size, Margins.

You can learn how to assign outputclass attributes here: Outputclass Attributes for PDF Generator.

Table 2. Outputclass Attributes for Columns

PDF Generator Gray and Color templates are configured to respect these outputclass attributes by default. As a result, once you add them to a file, they are immediately applied to your output. There is no need to modify your PDF Generator scenario.

Outputclass Attribute

Description

Target DITA Element

two_column

Split the content into two columns

topic, element inside a topic

three_column

Split the content into three columns

topic, element inside a topic

four_column

Split the content into four columns

topic, element inside a topic