2018.1

Table Of Contents
query(html)
Creates a new HTML element on the fly from the provided string of raw HTML, and returns the
new element.
html
A String containing a HTML element. Tags that can contain other elements should be paired
with a closing tag.
Example
The following script adds a paragraph to the results (elements that match the selector of the
script).
results.append("<p>This is a new paragraph.</p>');
Tip
The Dynamic Attachment script uses this function to add an attachment to an Email section; see
"Email attachments" on page434.
resource()
The resource() function returns information about an image resource. It can also be used to
check if a file exists.
This function is useful in a Control Script, for example to check the number of pages or the page
height and width before setting it as a background (see "Control Script: Setting a Print section's
background" on page719).
resource(location, pageNumber)
location
The location should be a URL relative to the template root or an absolute file-based URL
(without protocol), e.g. "C:/myfile.pdf".
pageNumber (optional)
The desired page. Counting starts at 1. If no page number is given, information about the first
page will be retrieved.
Page 1076