|Top Previous Next|
The -pdfpermit option sets the permissions allowed for an encrypted PDF file.
The permissions control what actions are allowed on an encrypted PDF file. The list of permissions are as follows:
You can also specify to turn off permissions with the following:
To specify multiple permissions, the PDFPermissions string must be enclosed in double quotes and each permission must be seperated by at least one space. For example, to turn on the modify permission, and turn off the print permissions, the following command-line can be used.
twainsave -f pdf -pdfpermit "modify noprint"
To turn off all permissions, the none option can be used. Similarly, to turn on all permissions, all can be used. Note that there are options to turn off and turn on permissions. For example, to turn on all permissions except for the printing:
twainsave -pdf -pdfpermit "all noprint"
To turn on only the modification and printing permissions:
twainsave -f pdf -pdfpermit "none modify print"
When encountering multiple permissions, TwainSave will read the permissions on the command-line from left to right, setting or unsetting the permissions as they appear in the command-line. Therefore, the following:
twainsave -pdf -pdfpermit "noprint all"
will first turn off the printing permission, but will turn it on again since the all permission was the next permission on the command-line.
Therefore, it is recommended that the all permission be used as the first permission if you want to turn off permissions. The all permission will turn on all the permissions, allowing the proper permissions to be turned off when they are encountered on the command line.
Similarly, if you want to start with no permissions and turn on certain permissions, the none permission should be the first permission in the list of permissions, allowing the proper permissions to be turned on when they are encountered on the command line.
All actions are permitted on the PDF file.