Go to Page

Add restrictions to a PDF

Set the permission flags that control copying, printing, and editing a PDF, in a Power Automate flow. No code, and nothing is stored.

Use this action to add restrictions to prevent copying, printing, and modifying a PDF document.

Add restrictions to a PDF
ParametersSettingsCode viewTestingAbout
File Content
File Content
Owner Password
The password required to open and change permissions
User Password
The password required to open the PDF document
Allow Copy Content
Allow Change Content
Allow Print
Allow Print High Resolution
Allow Comment And Fill Form
Allow Fill Form
Allow Assemble Document
Allow Accessibility
Add restrictions to a PDF.

Some parameters below are rolling out to the published PDF Blocks connector and may not appear in your environment yet. To use them today, import the connector from GitHub as a custom connector.

The PDF specification allows setting restrictions to some uses, such as copy, print, filling forms, etc. It’s up to each PDF software to enforce these restrictions, and they are trivial to remove. This is described on page 60 of the PDF specification:

Once the document has been opened and decrypted successfully, a conforming reader technically has access to the entire contents of the document. There is nothing inherent in PDF encryption that enforces the document permissions specified in the encryption dictionary.

Parameters

File ContentFilerequired

The content of the input PDF document.

Owner PasswordStringrequired

The password required to open and change permissions of the PDF document. The length is between 4 and 32 characters. The characters in the password must be in the ASCII printable range (between positions 32 and 126). This range includes lowercase and uppercase letters, numbers, space, and some commonly used symbols like . , : ; # $ % & ( ) * + = ? !

User PasswordString

The password required to open the PDF document. This field is optional. Has the same requirements as Owner Password.

Allow Copy ContentBooleandefault:Yes

If set to Yes, users can copy the text, images, and other content to the clipboard. This field is optional.

Allow Change ContentBooleandefault:Yes

If set to Yes, users can change the content of the document. This field is optional.

Allow PrintBooleandefault:Yes

If set to Yes, users can print the document. This field is optional.

Allow Print High ResolutionBooleandefault:Yes

If set to Yes, users can print the document in high resolution. This field is optional.

Allow Comment And Fill FormBooleandefault:Yes

If set to Yes, users can add, edit and modify annotations and fill form fields. This field is optional.

Allow Fill FormBooleandefault:Yes

If set to Yes, users can fill form fields. This field is optional.

Allow Assemble DocumentBooleandefault:Yes

If set to Yes, users can assemble and manipulate the document (add or remove pages, merge, etc). This field is optional.

Allow AccessibilityBooleandefault:Yes

If set to Yes, accessibility programs can read the text and images of the document. This field is optional.

Encryption AlgorithmStringdefault:AES-128

The algorithm used to encrypt the PDF document. This field is optional. Valid values are AES-128 and AES-256.

Response

Locked PDF File ContentFile

The content of the locked PDF document. You can use it as an input to other actions in your flow.