2022.1

Table Of Contents
The preview pdf node accepts runtime parameters. These can be passed via the parameters
property of the msg object which is passed between nodes. For example, a runtime parameter
named brandId would be passed via msg.parameters.brandId.
Creating and saving multiple PDF files
A PDF preview is usually needed in online solutions, but the preview PDF node can also be
used in situations where a PDF file can be produced without an Output Creation Preset.
In such situations the flow could for example have an OL Connect data get node (see "OL
Connect nodes" on page200) that outputs an array of Data Record IDs, followed by a standard
split node, OL Connect's preview pdf node and a standard write file node.
The preview pdf node can only take one data record ID at a time. That's why you will need the
split node to iterate over the array in msg.payload and generate a new message for each file,
setting msg.payload to the respective Data Record ID. (See "Iterating over items in an array" on
page208.)
Make sure to clear the Filename field in the write file output node before deploying the flow. A
value configured in the node takes precedence over the msg property - msg.filename in this
case - and will be used for every file, overwriting the previous file.
Files used in a preview PDF flow
Before creating a preview PDF flow, you will need to create:
l A template with a Print context. (See "Creating a template" on page477.)
In addition, the flow may use:
l A data mapping configuration, if the document(s) should contain variable data that is
extracted from some data source. (See "Creating a new data mapping configuration" on
page223.)
These files are made with the Designer and need to be sent to the OL Connect server before
using them in a flow. For instructions see "OL Connect resources in Node-RED" on page202.
Page 216