Some test text!

Search
Hamburger Icon

Cli / Guides / Permission

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:

+-----------------------+-----------------------+-----------------------+
| Option                | Parameter             | Description           |
+=======================+=======================+=======================+
| -d or \--disable      | e.g. to disable any   | This option accepts a |
|                       | changes to the        | string of permissions |
|                       | document specify --d  | flags that should be  |
|                       | m                     | disabled.             |
|                       |                       |                       |
|                       | e.g. to disable       | The permission string |
|                       | printing and content  | may include the       |
|                       | extraction specify    | following flags:      |
|                       | --d phxdcm            |                       |
|                       |                       | -   a - All           |
|                       |                       |     permissions.      |
|                       |                       |                       |
|                       |                       | -   p - Printing.     |
|                       |                       |                       |
|                       |                       | -   m - Changing the  |
|                       |                       |     document.         |
|                       |                       |                       |
|                       |                       | -   c - Content       |
|                       |                       |     copying or        |
|                       |                       |     extraction.       |
|                       |                       |                       |
|                       |                       | -   o - Commenting.   |
|                       |                       |                       |
|                       |                       | -   f - Filling of    |
|                       |                       |     form fields.      |
|                       |                       |                       |
|                       |                       | -   x - Content       |
|                       |                       |     extraction for    |
|                       |                       |     accessibility.    |
|                       |                       |                       |
|                       |                       | -   s - Document      |
|                       |                       |     assembly.         |
|                       |                       |                       |
|                       |                       | -   h - High quality  |
|                       |                       |     printing.         |
+-----------------------+-----------------------+-----------------------+
| -e or --enable        | e.g. to enable        | A string of           |
|                       | commenting: -e o      | permissions flags     |
|                       |                       | (see \--disable       |
|                       |                       | option above) that    |
|                       |                       | can be enabled. If    |
|                       |                       | there is a conflict   |
|                       |                       | with one of the flags |
|                       |                       | in the \'disable\'    |
|                       |                       | option, the           |
|                       |                       | permission is not     |
|                       |                       | granted.              |
+-----------------------+-----------------------+-----------------------+

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:

+-----------------------+-----------------------+-----------------------+
|  Adobe®               |  PDFSecure Parameters                         |
| Acrobat® Reader       |                                               |
+=======================+=======================+=======================+
|  Printing Allowed     |  None. Prohibits all  |  'p' and 'h' flags    |
|                       | printing.             | are present in -d     |
|                       |                       | string                |
|                       |                       |                       |
|                       |                       |  (e.g. --d ph)        |
+-----------------------+-----------------------+-----------------------+
|                       |  Low resolution.      |  'h' flag is present  |
|                       | Allows printing, but  | in --d string (e.g.   |
|                       | only at a low         | --d h)                |
|                       | resolution.           |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  High resolution:     |  'p' and 'h' flags    |
|                       | Allows full printing  | are present in -e and |
|                       | privileges.           | absent in --d string  |
|                       |                       | (e.g. --e ph)         |
+-----------------------+-----------------------+-----------------------+
|    Changes Allowed    |  None. Prohibits all  |  'm' and 's' flags    |
|                       | changes to the        | are present in -d     |
|                       | document.             | string                |
|                       |                       |                       |
|                       |                       |  (e.g. --d ms).       |
+-----------------------+-----------------------+-----------------------+
|                       |  Inserting, deleting  |  's' flag is present  |
|                       | and rotating pages:   | in -e and absent in   |
|                       | Allows the insertion, | --d string (e.g. --e  |
|                       | deletion, and         | s).                   |
|                       | rotation of pages.    |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  Filling in form      |  --e f --d s          |
|                       | fields and signing    |                       |
|                       | existing signature    |                       |
|                       | fields: Prohibits     |                       |
|                       | changes to the        |                       |
|                       | document, but allows  |                       |
|                       | form field editing,   |                       |
|                       | and digital           |                       |
|                       | signatures.           |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  Commenting, filling  |  --e o                |
|                       | in form fields and    |                       |
|                       | signing existing      |                       |
|                       | signature fields:     |                       |
|                       | Allows for the        |                       |
|                       | addition of comments, |                       |
|                       | form data, and        |                       |
|                       | digital signatures.   |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  Any except           |  -d x                 |
|                       | extracting pages:     |                       |
|                       | Allows all changes    |                       |
|                       | except for the        |                       |
|                       | extraction of pages.  |                       |
+-----------------------+-----------------------+-----------------------+
| Enable copying of     |  Off: Prohibits       |  -d c                 |
| text, images, and     | readers selecting     |                       |
| other content         | text or graphical     |                       |
|                       | objects, which would  |                       |
|                       | allow copying and     |                       |
|                       | pasting of content.   |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  On: Enables text and |  -e cx                |
|                       | graphics selection,   |                       |
|                       | allowing for          |                       |
|                       | extraction of this    |                       |
|                       | content.              |                       |
+-----------------------+-----------------------+-----------------------+
| Enable text access    |  Off: Does not allow  |  -d x                 |
| for screen readers    | text to be accessed   |                       |
| for the visually      | by screen-reading     |                       |
| impaired              | software for the      |                       |
|                       | visually impaired.    |                       |
+-----------------------+-----------------------+-----------------------+
|                       |  On: Allows text to   |  -e x                 |
|                       | be accessed by        |                       |
|                       | screen-reading        |                       |
|                       | software for the      |                       |
|                       | visually impaired.    |                       |
+-----------------------+-----------------------+-----------------------+

Get the answers you need: Chat with us