ftos.files.pdf.form.setFieldsReadOnly

Toggles the read-only flag for all fields (for all fields or for the fields specified by "fields" parameter, for all fields if "fields" parameter is not specified) in a PDF and saves the result to a new file. The end-user can’t modify the fields that are set to read-only using this method. Fields that were set as read-only with this SDK method, are still displayed in the server automation code sample.

The method throws exceptions that you can catch with try catch. In this case, your script keeps running, the error doesn’t block or kill execution.

This is a business logic method for business service components.

Syntax

Copy
ftos.files.pdf.form.setFieldsReadOnly(sourceRealName: string, outputFile: string, isReadOnly: boolean, formFields: string): any
 
Parameters Type Description
sourceRealName string The name of the source PDF file containing interactive form fields.
outputFile string The name of the output PDF file where the updated form will be saved.
isReadOnly boolean Set it to true to lock fields or false to unlock if the fields were previously made read-only.

formfields

string

Optional, if specified apply the change only to fields in this list (partial read only).

Return Value

Returns the real name of the generated PDF.