2019.2

Table Of Contents
Permissions
Allows to verify if a PDF is password-protected or has restrictions for printing.
This is part of the information about an image that is returned by the resource() function; see
"resource()" on page1360).
Note
If a PDF that does not allow content copying, Connect cannot handle the PDF at all and we cannot
determine the permissions. In that case hasPassword will be true (even if the password is not
set) and printingAllowedwill be unknown.
Field Type Description
hasPassword Boolean Will be true if the resource is a password protected PDF.
printingAllowed String Will be either "highres" (full permissions), "lowres", "none",
or "unknown".
Example
The following script logs the permissions for a PDF.
var pdf = resource("images/myPDF.pdf");
var willPrint = pdf.permissions.printingAllowed;
var hasPW = pdf.permissions.hasPassword;
logger.info('Printing restrictions: ' + willPrint);
logger.info('Password-protected: ' + hasPW);
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 page885 and "Control Script API" on page1351).
Retrieving a section
A section can be retrieved using merge.template.contexts.ContextType.sections["section
name"], for example: merge.template.contexts.PRINT.sections["Section EN"].
Page 1362