Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

OmniStudio Document Generation: Page Break Behavior

公開日: Jun 25, 2026
説明

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:

 

  1. Condition Evaluation Token:
    • Example: {{#IF_token_name}} --> start
      <Content to display>
      {{/IF_token_name}} --> end
  2. Repeating Content Token:
    • Example: {{#token_name}} --> start
      <Content to repeat>
      {{/token_name}} --> end

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

 

PlacementBlank Page When Condition Is False?Recommended?
---------
Before opening token tagYes — blank page before sectionNo
After closing token tagYes — blank page after sectionNo
Between token blocks (inside content)No — page break suppressed with blockYes

 

ナレッジ記事番号

004052252

 
読み込み中
Salesforce Help | Article