|
resource()The 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). 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. The returned object is of the type ImageInfo. It has the following fields:
ExamplesThis script retrieves the second page of a PDF that is present in the template's resources.
In this script, the function is used to check if a file exists.
|
|