2021.2

Table Of Contents
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
page922.
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
options and can be used to set (or rather, override) them via a Control Script (see "Control
Scripts" on page913 and "Control Script API" on page1405). This is especially useful when
you need identical sections with different sheet configuration settings.
The sheetConfig object can be retrieved via the section object (see "section" on page1454);
see the example below.
Fields
The fields of the sheetConfig object correspond to settings in the Sheet Configuration dialog;
see "Sheet Configuration dialog" on page1025.
Field Type Description
duplex Boolean
Enables or disables duplex (two-sided) printing.
facingPages Boolean (Only with duplex printing.) When facingPages is
Page 1429