2021.2

Table Of Contents
Field Type Description
footer
header
String These fields allow to set the header and footer of a Master Page,
using a Measurement string.
Examples
Setting the margins of a Print section
var sectionA = merge.template.contexts.PRINT.sections["Section A"];
sectionA.margins.top = "2in";
sectionA.margins.left = "2in";
sectionA.margins.right = "2in";
sectionA.margins.bottom = "2in";
Setting the header and footer of a Master Page
var masterA = merge.template.masterpages["Master page A"];
masterA.margins.header = "2in";
masterA.margins.footer = "2in";
paginate()
This method of the section object (see "section" on page1454) triggers pagination of the
current section. The pagination process re-establishes page boundaries, updates page
numbers and page counts, and reapplies Master Pages.
Depending on whether page numbering restarts in each section this may affect the page
numbers in other sections as well (see "Configuring page numbers" on page502).
When the pagination process has ended, the script resumes.
The 'current section' is always a Print section, since this method can only be used in Post
Pagination Scripts, and Post Pagination Scripts only run on the Print context (see "Post
Pagination Scripts" on page929).
You only need to call merge.section.paginate() in a Post Pagination Script if the script has
added or removed content to such an extent that the page boundaries need to be renewed.
For an example see: "Creating a Table Of Contents" on page931.
Page 1464