2019.1

Table Of Contents
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:
Field Type Description
height float The height of the current page (in points).
page Number Current page number (counting from 1) within the resource.
pages Number The total number of pages in the resource.
permissions
Permissions
PDF only. Allows to verify if a PDF is password-protected
or has restrictions for printing.
width float The width of the current page (in points)
Examples
This script retrieves the second page of a PDF that is present in the template's resources.
var pdf = resource("images/stamp.pdf", 2);
var height = pdf.height;
var width = pdf.width;
var numberOfPages = pdf.pages;
In the following script, the function is used to check if a file exists.
if(resource("C:/paw.pdf")){
//exists
} else {
//oops
}
section
The section object can be used to query and modify how the section (and the related context)
will be outputted. It is one of the most important objects in Control Scripts (see "Control Scripts"
on page828 and "Control Script API" on page1280).
Page 1287