-pdfpermit

Top  Previous  Next

-pdfpermit "PDFPermissions"

 

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:

 

Permission

Description

all

Turns on all permissions.

assembly

Allows text extraction (in support of accessibility to disabled users or for other purposes)

copy

Allows copying and text extraction of PDF file.

degradeprint

Allows printing a documented with degraded print quality (Strong encryption only).

extract

Allows text extraction (in support of accessibility

to disabled users or for other purposes) (Strong encryption only)

fillin

Allows fill-in of interactive form fields (Strong encryption only).

modannot

Allows modification of the PDF annotations.

modify

Allow modification of PDF file

print

Allows printing PDF file.

 

You can also specify to turn off permissions with the following:

 

Permission

Description

none

Turns off all permissions

noassembly

Disallows text extraction (in support of accessibility to disabled users or for other purposes)

nocopy

Disallows copying and text extraction of PDF file.

nodegradeprint

Disallows printing a documented with degraded print quality (Strong encryption only).

noextract

Disallows text extraction (in support of accessibility

to disabled users or for other purposes) (Strong encryption only)

nofillin

Disallows fill-in of interactive form fields (Strong encryption only).

nomodannot

Disallows modification of the PDF annotations.

nomodify

Disallow modification of PDF file

noprint

Disallows printing PDF file.

 

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.

 

Default Setting:

All actions are permitted on the PDF file.