Section:

Setting PDF Permissions from Command-line

If the output document is protected with an owner password (also known as master or permission password), it is possible to adjust standard PDF permissions using the following options:

sh

1+-----------------------+-----------------------+-----------------------+
2| Option | Parameter | Description |
3+=======================+=======================+=======================+
4| -d or \--disable | e.g. to disable any | This option accepts a |
5| | changes to the | string of permissions |
6| | document specify --d | flags that should be |
7| | m | disabled. |
8| | | |
9| | e.g. to disable | The permission string |
10| | printing and content | may include the |
11| | extraction specify | following flags: |
12| | --d phxdcm | |
13| | | - a - All |
14| | | permissions. |
15| | | |
16| | | - p - Printing. |
17| | | |
18| | | - m - Changing the |
19| | | document. |
20| | | |
21| | | - c - Content |
22| | | copying or |
23| | | extraction. |
24| | | |
25| | | - o - Commenting. |
26| | | |
27| | | - f - Filling of |
28| | | form fields. |
29| | | |
30| | | - x - Content |
31| | | extraction for |
32| | | accessibility. |
33| | | |
34| | | - s - Document |
35| | | assembly. |
36| | | |
37| | | - h - High quality |
38| | | printing. |
39+-----------------------+-----------------------+-----------------------+
40| -e or --enable | e.g. to enable | A string of |
41| | commenting: -e o | permissions flags |
42| | | (see \--disable |
43| | | option above) that |
44| | | can be enabled. If |
45| | | there is a conflict |
46| | | with one of the flags |
47| | | in the \'disable\' |
48| | | option, the |
49| | | permission is not |
50| | | granted. |
51+-----------------------+-----------------------+-----------------------+

Permissions for the document can be set separately from access to the document which is controlled using the user password. With password security, it is possible to require different passwords to open (i.e. user password) and modify (i.e. owner password) the document. This means that you can allow one set of users to open the document, and another, possibly smaller set, to make unrestricted changes. Users without the owner password can only make the changes allowed when the document was prepared.

The following table relates permissions settings options in Adobe® Acrobat® Reader to permission flags in Apryse PDFSecure:

sh

1+-----------------------+-----------------------+-----------------------+
2| Adobe® | PDFSecure Parameters |
3| Acrobat® Reader | |
4+=======================+=======================+=======================+
5| Printing Allowed | None. Prohibits all | 'p' and 'h' flags |
6| | printing. | are present in -d |
7| | | string |
8| | | |
9| | | (e.g. --d ph) |
10+-----------------------+-----------------------+-----------------------+
11| | Low resolution. | 'h' flag is present |
12| | Allows printing, but | in --d string (e.g. |
13| | only at a low | --d h) |
14| | resolution. | |
15+-----------------------+-----------------------+-----------------------+
16| | High resolution: | 'p' and 'h' flags |
17| | Allows full printing | are present in -e and |
18| | privileges. | absent in --d string |
19| | | (e.g. --e ph) |
20+-----------------------+-----------------------+-----------------------+
21| Changes Allowed | None. Prohibits all | 'm' and 's' flags |
22| | changes to the | are present in -d |
23| | document. | string |
24| | | |
25| | | (e.g. --d ms). |
26+-----------------------+-----------------------+-----------------------+
27| | Inserting, deleting | 's' flag is present |
28| | and rotating pages: | in -e and absent in |
29| | Allows the insertion, | --d string (e.g. --e |
30| | deletion, and | s). |
31| | rotation of pages. | |
32+-----------------------+-----------------------+-----------------------+
33| | Filling in form | --e f --d s |
34| | fields and signing | |
35| | existing signature | |
36| | fields: Prohibits | |
37| | changes to the | |
38| | document, but allows | |
39| | form field editing, | |
40| | and digital | |
41| | signatures. | |
42+-----------------------+-----------------------+-----------------------+
43| | Commenting, filling | --e o |
44| | in form fields and | |
45| | signing existing | |
46| | signature fields: | |
47| | Allows for the | |
48| | addition of comments, | |
49| | form data, and | |
50| | digital signatures. | |
51+-----------------------+-----------------------+-----------------------+
52| | Any except | -d x |
53| | extracting pages: | |
54| | Allows all changes | |
55| | except for the | |
56| | extraction of pages. | |
57+-----------------------+-----------------------+-----------------------+
58| Enable copying of | Off: Prohibits | -d c |
59| text, images, and | readers selecting | |
60| other content | text or graphical | |
61| | objects, which would | |
62| | allow copying and | |
63| | pasting of content. | |
64+-----------------------+-----------------------+-----------------------+
65| | On: Enables text and | -e cx |
66| | graphics selection, | |
67| | allowing for | |
68| | extraction of this | |
69| | content. | |
70+-----------------------+-----------------------+-----------------------+
71| Enable text access | Off: Does not allow | -d x |
72| for screen readers | text to be accessed | |
73| for the visually | by screen-reading | |
74| impaired | software for the | |
75| | visually impaired. | |
76+-----------------------+-----------------------+-----------------------+
77| | On: Allows text to | -e x |
78| | be accessed by | |
79| | screen-reading | |
80| | software for the | |
81| | visually impaired. | |
82+-----------------------+-----------------------+-----------------------+

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales