2018.2

Table Of Contents
var activeSection = merge.template.contexts.PRINT.sections['Section
1'];
activeSection.background.source = BackgroundResource.RESOURCE_PDF;
activeSection.background.position = MediaPosition.ABSOLUTE;
activeSection.background.left = "10mm";
activeSection.background.top = "10mm";
activeSection.background.url = "images/somepage.pdf";
The next script scales the background of a Print section to the size of the Media.
var activeSection = merge.template.contexts.PRINT.sections['Section
1'];
activeSection.background.source = BackgroundResource.RESOURCE_PDF;
activeSection.background.position = MediaPosition.FIT_TO_MEDIA;
activeSection.background.url = "images/somepage.pdf";
Post Pagination Script API
The table below lists the functions and objects that are only available in Post Pagination
Scripts. Click through to the object to find a description and sample scripts.
See "Post Pagination Scripts" on page383 for information about this kind of scripts, how to
insert them and what you can do with them.
Note
Post Pagination Scripts only apply to the Print context. These functions and objects cannot be used
with other contexts.
Tip
It is possible to define a function in a Control Script which calls these functions, as long as that
function is only invoked from a Post Pagination Script.
Object or
function
Usage
merge.context.
"query(selector)"
Call merge.context.query(selector) to run a query across all
sections in the Print context. The query returns a result set that is read-
Page 774