2020.2

Table Of Contents
Field Type Description
l An absolute Windows-style path.
A relative path and a URL are expected to be URL
encoded. For example, a space needs to be encoded
as %20.
An absolute Windows-style path does not need to be
URL encoded, but in JavaScript any backslashes in a
String need to be double-escaped:
"C:\\Images\\Image.pdf".
Example
This scripts sets a background on a Print section using absolute positioning.
var activeSection = merge.template.contexts.PRINT.sections['Section
1'];
activeSection.background.source = BackgroundResource.RESOURCE_PDF;
activeSection.background.url = "images/somepage.pdf";
activeSection.background.position = MediaPosition.ABSOLUTE;
activeSection.background.left = "10mm";
activeSection.background.top = "10mm";
You could replace the last three lines of the previous script by the following line to scale the
Print section background to Media size:
activeSection.background.position = MediaPosition.FIT_TO_MEDIA;
Tip
For more examples, see "Control Script: Setting a Print section's background" on
page899.
sheetConfig
Sheet configuration settings are the Master Page, Media and Duplex printing options of
first/middle/last/single or all sheets in a Print section. The sheetConfig object holds these
Page 1402