This article answers the question: "Why do extra blank pages appear in my OmniStudio Document Generation Word template when I add page breaks near conditional or repeating token blocks?"
OmniStudio Document Generation uses token structures in Microsoft Word templates to control conditional and repeating content. Two common token types are:
When page breaks are placed before, after, or between these token blocks, the resulting behavior depends on exact placement. Incorrect placement causes unexpected blank pages or content misalignment — especially when the conditional data is absent and the block does not render.
OmniStudio Document Generation processes page breaks differently depending on where they are placed relative to token block boundaries. The three scenarios below describe each placement option, its behavior, and the recommended approach.
Scenario 1: Page Break Placed Before the Opening Token Tag
When a page break is inserted immediately before the opening tag of a conditional or repeating block (for example, before {{#IF_token_name}}), the following occurs:
1. The page break is always rendered, regardless of whether the conditional data is present.
2. If the condition evaluates to false and the block does not display, the page break still fires, producing a blank page between the preceding section and the next section.
3. Avoid this placement when the conditional block may not render — it will cause an extra blank page before the section.
Scenario 2: Page Break Placed After the Closing Token Tag
When a page break is inserted immediately after the closing tag of a conditional or repeating block (for example, after {{/IF_token_name}}), the following occurs:
1. The page break is always rendered, regardless of whether the conditional data is present.
2. If the condition evaluates to false, the block does not display but the page break still fires, producing a blank page between the current section and the next section.
3. Avoid this placement when the conditional block may not render — it will cause an extra blank page after the section.
Scenario 3: Page Break Placed Between Token Blocks (Recommended)
When a page break is inserted between the closing tag of one block and the opening tag of the next block — that is, inside the content area rather than outside the token boundaries — the following occurs:
1. The page break is governed by the token logic of the surrounding blocks.
2. If a conditional block does not render, the page break within it is also suppressed, so no blank page is inserted.
3. This placement works correctly for both conditional sections and repeating sections, maintaining continuous document flow without unintended blank pages.
4. Use this placement as the standard approach for all page breaks near conditional or repeating token blocks.
Summary of Page Break Behavior
| Placement | Blank Page When Condition Is False? | Recommended? |
|---|---|---|
| --- | --- | --- |
| Before opening token tag | Yes — blank page before section | No |
| After closing token tag | Yes — blank page after section | No |
| Between token blocks (inside content) | No — page break suppressed with block | Yes |
004052252

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.