2022.2

Table Of Contents
Tip: NewControlScriptsaddedtothetemplatecontaincodetocontinuethepagenum-
beringoverallprintsections,andtwoexamples:onetoselectdifferentsectionsofaPrint
contextforemailandprintoutput,andonetoselectaWebsection.
WhattouseaControlScriptfor
ControlScriptsletyouchangethewayatemplateismerged,bygivingaccesstothetemplatewithall
itscontextsandsectionsinascript.AControlScriptmay,forexample,omit,groupandclonesections;
addabackgroundtoaPrintsection;oraddaheadertoanemail.Anumberofthethingsthatyoucan
dowiththemislistedinthetablebelow,withalinktoatopicthatexplainshowtodoitandthatshows
whatthescriptshouldlooklike.
InaControlScript,sectionusuallyisthemostimportantobject.Togetaquickoverviewandlotsof
examples,see"section"onpage848.Forhelponspecifictasks,seethetablebelow.
Task See topic Field/function of sec-
tion object
Changethepage num-
beringofPrintsections
"ControlScript:Pagenumbering"onthefacingpage
restartPageNumbering
Setthebackground
imageofaPrintsection
"ControlScript:SettingaPrintsection'sbackground"onpage404 background.source,back-
ground.url,background.position
Split andrenamePrint
emailattachments
"Parts:splittingandrenamingemailattachments"onpage402
part
Dynamicallysetapass-
wordonPDFattachments
"ControlScript:SecuringPDFattachments"onpage408 password,ownerPassword
Include/exclude sections:
l
Conditionallyomit
PrintorEmailsec-
tions
l
Outputonesec-
tionoranother,
basedonthe
valueofadata
field
l
SelectonePrint
sectionasPDF
attachmentifthe
outputistobe
emailed,and
anotherPrintsec-
tioniftheoutputis
tobeprinted.
UseaConditionalPrintSectionscripttoin-/excludeaPrintsection
basedonasimplecondition;see"section"onpage848
Inallothercasestakealookattheexamplesinthefollowingtopic:
"section"onpage848.
enabled
Page 399