2022.2

Table Of Contents
var author = merge.template.properties.author;
var myProperty = merge.template.customProperties.myPropertyName;
BackgroundResource
BackgroundResourceisanenumerationforthetypesofbackgroundresourcesforaPrintsection(see
"background"onpage1286and"section"onpage1305).
APrintsectioncanberetrievedinscriptusingmerge.tem-
plate.contexts.ContextType.sections["section name"],forexamplemerge.tem-
plate.contexts.PRINT.sections["Section EN"].
Field Description
DATAMAPPER_PDF
APDFfileretrievedviatheactivedatamappingconfiguration.ThiscanbethePDFfilethatwasusedasinputfile,oranother
typeofinputfile,convertedtoPDF.
NONE
NoPDFbackground.
RESOURCE_PDF
APDForotherimagefilewhichisstoredinthetemplateoronthenetwork.Notethatitisn'tpossibletousearemotelystored
imagefileasasection'sbackground.
Example
Thefollowingscriptsetsthebackgroundforasectioncalled'Policy'toRESOURCE_PDFandspecifiesa
pathforit,usingadatavalue:
// Enable the section background and specify that the PDF should be read
// from a resource file rather than using a PDF DataMapper background
merge.template.contexts.PRINT.sections['Policy'].background.source = BackgroundResource.RESOURCE_PDF;
// Specify the path
var resourceUrl = 'images/policy-' + record.fields.policy + '.pdf';
merge.template.contexts.PRINT.sections['Policy'].background.url = resourceUrl;
Note: TolearnhowtosetaPDFfileasabackgroundimageonaPrintsectionwithoutaControl
Script,see"UsingaPDFfileorotherimageasbackground"onpage451.
Channel
Channelisanenumerationfortheoutputchannels.Theactiveoutputchannelisregisteredin
merge.channel.
Page 1294