> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/cli/pdfsecure/options/permission.md).

# Setting PDF Permissions from Command-line

Learn how to adjust PDF permissions with owner passwords, set user and owner passwords for different access levels, and secure your documents effectively. The Apryse CLI streamlines secure document pr

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:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
+-----------------------+-----------------------+-----------------------+
| 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.              |
+-----------------------+-----------------------+-----------------------+
```

{% endcode %}
{% endtab %}
{% endtabs %}

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:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
+-----------------------+-----------------------+-----------------------+
|  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.    |                       |
+-----------------------+-----------------------+-----------------------+
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/cli/pdfsecure/options/permission.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
