2022.2

Table Of Contents
Thepreview pdfnodeacceptsruntime parameters.Thesecanbepassedviatheparametersprop-
ertyofthemsgobjectwhichispassedbetweennodes.
Forexample,aruntimeparameternamedbrandIdwouldbepassedviamsg.parameters.brandId.
CreatingandsavingmultiplePDFfiles
APDFpreviewisusuallyneededinonlinesolutions,butthepreviewPDFnodecanalsobeusedinsitu-
ationswhereaPDFfilecanbeproducedwithoutanOutputCreationPreset.
InsuchsituationstheflowcouldforexamplehaveanOLConnectdata getnode(see"OLConnect
nodes"onpage182)thatoutputsanarrayofDataRecordIDs,followedbyastandardsplitnode,OL
Connect'spreview pdfnodeandastandardwrite filenode.
Thepreview pdfnodecanonlytakeonedatarecordIDatatime.That'swhyyouwillneedthesplit
nodetoiterateoverthearrayinmsg.payloadandgenerateanewmessageforeachfile,setting
msg.payloadtotherespectiveDataRecordID.(See"Iteratingoveritemsinanarray"onpage188.)
MakesuretocleartheFilenamefieldinthewrite fileoutputnodebeforedeployingtheflow.Avalue
configuredinthenodetakesprecedenceoverthemsgproperty-msg.filenameinthiscase-andwill
beusedforeveryfile,overwritingthepreviousfile.
Files used in a preview PDF flow
BeforecreatingapreviewPDFflow,youwillneedtocreate:
l
AtemplatewithaPrintcontext.(See"Creatingatemplate"onpage415.)
Inaddition,theflowmayuse:
l
Adatamappingconfiguration,ifthedocument(s)shouldcontainvariabledatathatisextracted
fromsomedatasource.(See"Creatinganewdatamappingconfiguration"onpage200.)
ThesefilesaremadewiththeDesignerandneedtobesenttotheOLConnectserverbeforeusing
theminaflow.Forinstructionssee"OLConnectresourcesinNode-RED"onpage183.
An OL Connect web flow in Node-RED
ThistopicexplainswhichnodesandfilesareusedinatypicalOLConnectwebflowinNode-RED.
Tip: AneasywaytocreatethefilesthatthetypicalOLConnectwebflowneeds,istousea
Sample Project.See"SampleProject:ServingaWebPage"onpage164.Youwoulduseall
filesexcepttheWorkflowconfigurationfile.
The structure of an OL Connect web flow
InanOLConnectwebflowonlyonepluginisessential:thehtml contentplugin.
Page 195