2022.2

Table Of Contents
Fields
Field Type Description
bottom
left
right
top
String Thesefieldsallowtosetthebottom,left,rightandtopofaPrintsection,usingaMeasurementstring,for
example:"2in"(thissetsamargintotwoinches).
footer
header
String Thesefieldsallowtosettheheaderandfooterofa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()
Thismethodofthesectionobject(see"section"onpage1305)triggerspaginationofthecurrentsec-
tion.Thepaginationprocessre-establishespageboundaries,updatespagenumbersandpagecounts,
andreappliesMasterPages.
Dependingonwhetherpagenumberingrestartsineachsectionthismayaffectthepagenumbersin
othersectionsaswell(see"Configuringpagenumbers"onpage458).
Whenthepaginationprocesshasended,thescriptresumes.
The'currentsection'isalwaysaPrintsection,sincethismethodcanonlybeusedinPostPagination
Scripts,andPostPaginationScriptsonlyrunonthePrintcontext(see"PostPaginationScripts"on
page850).
Youonlyneedtocallmerge.section.paginate()inaPostPaginationScriptifthescripthas
addedorremovedcontenttosuchanextentthatthepageboundariesneedtoberenewed.
Foranexamplesee:"CreatingaTableOfContents"onpage852.
Page 1312