2022.2

Table Of Contents
Field Type Description
hasPassword
Boolean WillbetrueiftheresourceisapasswordprotectedPDF.
printingAllowed
String Willbeeither"highres"(fullpermissions),"lowres","none",or"unknown".
Example
ThefollowingscriptlogsthepermissionsforaPDF.
var pdf = resource("images/myPDF.pdf");
var willPrint = pdf.permissions.printingAllowed;
var hasPW = pdf.permissions.hasPassword;
logger.info('Printing restrictions: ' + willPrint);
logger.info('Password-protected: ' + hasPW);
section
Thesectionobjectcanbeusedtoqueryandmodifyhowthesection(andtherelatedcontext)willbe
outputted.ItisoneofthemostimportantobjectsinControlScripts(see"ControlScripts"onpage838
and"ControlScriptAPI"onpage1271).
Retrievingasection
Asectioncanberetrievedusingmerge.template.contexts.ContextType.sections["sec-
tion name"],forexample:merge.template.contexts.PRINT.sections["Section EN"].
Asectioncanalsoberetrievedviamerge.context.sections['section name'].Remember,
however,thatwhenseveralcontextsneedtobemerged(forexample,whenthePrintcontextis
attachedtoanemail),thescriptneedstocheckifthecurrentcontextisofthetypethatcontainsthe
desiredsection(forexample:if (merge.context.type == ContextType.PRINT) {}).When
sectionsindifferentcontextshavethesamename,itissafertousemerge.tem-
plate.contexts.ContextType.sections["section name"].
Fields
Field Type Description
"background"on
page1286
Background
Print sections only. Used to set a PDF background on a Print section. See
"ControlScript:SettingaPrintsection'sbackground"onpage845 and "Back-
groundResource"onpage1294.
Page 1280