New page

The newpage tag generates page breaks in PDF export.

In case you want to insert a page break or start on a new page, the newpage tag can be used. Note that the newpage tag only works in PDF export, both in input as well as in preview screen the newpage will be ignored (and not generate any whitespace).

The most common use case to apply the newpage tag would be in the detail text section of the export style (to be accessed via Styles → Style settings). F.i. in case a new section of the PDF export starts (e.g. Liabilities details after Assets details) and the user prefers to have this new section start on a new page.

Test

{% newpage %}

Test on new page
Output

Newpage preferred orientation

In default export styles you might run into code looking like this:

{% for account_or_text in export.selected_accounts_and_reconciliation_texts.assets %}
  ...
  {% newpage account_or_text.preferred_orientation %}
  ...
  {{ account_or_text.rendered_template }}
  ...
{% endfor %}

There is a possibility to define the preferred orientation of the newpage. Of course, one could also make use of the changeorientation tag but also the newpage tag allows to set the page orientation. E.g.:

{% newpage 'landscape' %}

In line with the changeorientation tag, once you have selected a certain page orientation, all pages following will be in the same orientation unless you change it back (e.g.: {% newpage account_or_text.preferred_orientation %} or {% newpage 'portrait' %}.

{% for account_or_text in export.selected_accounts_and_reconciliation_texts.assets %}
{% if forloop.first %}
{% newpage account_or_text.preferred_orientation %}
# <font size="16">{% t "Activa" %}</font>
{% else %}
{% newpage 'landscape' %}
{% endif %}

|--------+{{export.highlight_alt_bg_color}}
|<font color="{{export.highlight_alt_text_color}}">{{ account_or_text.name }}</font>

{{ account_or_text.rendered_template }}
{% endfor %}
Output

Section breaks

While newpage only has effect on PDF exports, it is possible to add the section_break attribute to visualize the split between pages in input mode. This tag will be used in the template code rather than in the detail text of the style.

{% newpage section_break:true %}

Below you see an example of how the section breaks looks on the platform.

👍

Section breaks without new pages in PDF

You can place the newpage tag within ic-tags if you want to use section breaks without necessarily also creating new pages in the PDF export. Do note that this means your section breaks will not be visible in preview, review & export if you do so.