2022.2

Table Of Contents
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.
From DataMapper inputcannotbeusedinPrintShopMailConnect.TheDataMapperisincludedonlyinPlan-
etPressConnectandPReSConnect.
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
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130.
Channel
Channelisanenumerationfortheoutputchannels.Theactiveoutputchannelisregisteredin
merge.channel.
Thechanneldoesn'tchangewhentheoutputconsistsofdifferentcontexts.Whengeneratingemail,for
example,thechannelisEMAIL,evenwhenmergingthePrintcontexttoattachittotheemail.
Page 836