Erik van den Heuvel
April 19th, 2021
Creating document variants based on data and a collection of pre-produced designs is a typical variable data printing scenario. These could be brochures with information of a reseller/dealership, postcards with an audience specific design from a library or personalised letters with recipient and sender information.
In OL Connect Designer switching these designs is commonly achieved by writing a control script to dynamically set the background image of a section. Version 2019.2 introduced a new scripting wizard to create such documents in a breeze and without having to write any code.
This article explains how to use the new Dynamic Section Background wizard to create postcard variants based on a collection of images and a matching data file. The data file contains information about the recipients and their favorite travel destination.
The postcard designs are created in Adobe Illustrator and stored as PDF in a folder on disk.
Each design consists of two pages: the front and back of the postcard. The image below shows the japan.pdf card opened in Acrobat Reader (Two Page View).
The value of the destination data field in the data holds the basename of the design files (e.g. japan, india, egypt and australia). This information will be used to construct the dynamic path. A sample data record looks something like this:
<street>74 Chinook Hill</street>
<address>Mano Gutierrez<br>74 Chinook Hill<br>Washington, DC 20319</address>
You can create a new template right from the File system.
Toggle to the Preview mode and browse through the records to see the various images being applied to the section background.