2022.2

Table Of Contents
AStringthatmaycontainHTMLtags.
Examples
Thefollowingscriptuseshtml()toretrievethecontentsofasectionandaddaparagraphtoit.
var foo = merge.context.sections["Section 1"].html();
foo += "<p>hello world</p>";
merge.context.sections["Section 1"].html( foo );
Thefollowingscriptloadsasnippetbasedonthevalueofafield,andthenreplacesthecontentofa
Printsectionwiththesnippetusinghtml().
var mySection = merge.context.sections["Section 1"];
var promoTxt = loadhtml('snippets/promo-' + record.fields['City'] + '.html');
mySection.html(promoTxt);
margins
ThemarginsobjectisusedtosetaPrintsectionorMasterPage'smarginsinaControlScript(see
"ControlScripts"onpage398and"ControlScriptAPI"onpage815).
NotethatMasterPagesareonlyusedinaPrintcontext(see"MasterPages"onpage141).
Themarginsobjectisretrievedviathesectionobject(see"section"onpage848)orviathemas-
terpagesarrayinatemplate(see"masterpage"onpage817),respectively.
Fields
Field Type Description
bottom
left
right
top
String Thesefieldsallowtosetthebottom,left,rightandtopofaPrintsection,usingaMeasurementstring,for
example:"2in"(thissetsamargintotwoinches).
footer
header
String ThesefieldsallowtosettheheaderandfooterofaMasterPage,usingaMeasurementstring.
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";
Page 737