OL Learn

Dynamic pdf backround


I have an A3 duplex setup in which I use 4 A4 PDF documents. Two of the PDF documents are put in the master pages front and back in opposite ends on page 1 and page 2 because they do not change. The other two has to change on field value. I am able to get the Single front page PDF to change on field value but not the Single back. Please show me what I’m doing wrong?

I’m using a conditional script with the below code
var activeSection = merge.template.contexts.PRINT.sections[‘Section 1’];
activeSection.background.source = BackgroundResource.RESOURCE_PDF;
activeSection.background.position = MediaPosition.ABSOLUTE;
activeSection.background.left = “209.4mm”;
activeSection.background.top = “10mm”;
if (record.fields[“Field1”] == “GBEN”) {
activeSection.background.url = “images/gben.pdf”;
if (record.fields[“Field1”] == “ABEN”) {
activeSection.background.url = “images/aben.pdf”;

When I make another conditional script for the Single back the Single front image gets ignored .

Your code seems legit but without seeing the whole Template, it is kind of hard figuring what is wrong.

I suggest you open a technical support ticket through our website.

Thanks a million I will upload template and data mapping configuration.