2021.1

Table Of Contents
Field Type Description
url String The location of the PDF to use as a background for
the section. Three different forms of URLs are
supported:
l A relative path to an image resource; this
always starts with "images/". For a file named
background.pdf, stored inside the template
resources, the URL would be
images/background.pdf.
l A URL (either file:, http:, or https:).
The complete syntax for an external file
is:file://<host>/<path>. If the host is"localhost",
it can be omitted, resulting infile:///<path>, for
example:
file:///c:/resources/images/imag
e.jpg.
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";
Page 1408