2022.2

Table Of Contents
addPolicy('a');
}
if(record.fields.policy_b == 1) {
addPolicy('b');
}
function addPolicy(policy){
var resourceUrl = 'images/policy-' + policy + '.pdf';
var clone = printSections["Policy"].clone();
clone.name = "policy_" + policy;
clone.background.url = resourceUrl;
clone.enabled = true;
printSections["Policy"].addAfter(clone);
}
background
ThebackgroundobjectholdsthePDFbackgroundofaPrintsection(see"section"onpage848and
"ControlScript:SettingaPrintsection'sbackground"onpage404).
Note: Settingapagerangeusingthestartandendfieldsautomaticallysetsback-
ground.allPagestofalse.
Whenyoufirstdefineapagerangeandthensetbackground.allPagestotrue,thepage
rangewillbedisabled.
Fields
Field Type Description
allPages
Boolean ShowallpagesfromthePDF.
end
Number TheendpageofthePDFtouseasabackgroundforthesection.
left
Measurement TheleftoffsetofthePDFbackground(onlywhenabsolutepositioningisselected).
position
"MediaPosition"onpage839 SetthepositionofthePDFbackground(Absolute,centered,fittomedia).
rotation
Number SettherotationofthePDFbackgroundto0,90,180or-90degrees.
scale
NumberorObject SetthesizeofthePDFbackgroundasapercentageoftheoriginalimage.Acceptedvaluesare:
l
Anumericvalue.
l
Astringcontaininganumberandpercentagecharacter:"<number>%".
l
Anobjectwithtwoproperties,"x"and"y",withnumericvalues:"{x:100,y:100}".Ifx
andyaredifferenttheimagewillbestretched.
Page 828