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.
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 ContentFilerequiredThe content of the input PDF document.
Owner PasswordStringrequiredThe 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 PasswordStringThe password required to open the PDF document. This field is optional. Has the same requirements as Owner Password.
Allow Copy ContentBooleandefault:YesIf set to Yes, users can copy the text, images, and other content to the clipboard. This field is optional.
Allow Change ContentBooleandefault:YesIf set to Yes, users can change the content of the document. This field is optional.
Allow PrintBooleandefault:YesIf set to Yes, users can print the document. This field is optional.
Allow Print High ResolutionBooleandefault:YesIf set to Yes, users can print the document in high resolution. This field is optional.
Allow Comment And Fill FormBooleandefault:YesIf set to Yes, users can add, edit and modify annotations and fill form fields. This field is optional.
Allow Fill FormBooleandefault:YesIf set to Yes, users can fill form fields. This field is optional.
Allow Assemble DocumentBooleandefault:YesIf set to Yes, users can assemble and manipulate the document (add or remove pages, merge, etc). This field is optional.
Allow AccessibilityBooleandefault:YesIf set to Yes, accessibility programs can read the text and images of the document. This field is optional.
Encryption AlgorithmStringdefault:AES-128The algorithm used to encrypt the PDF document. This field is optional. Valid values are AES-128 and AES-256.
Response
Locked PDF File ContentFileThe content of the locked PDF document. You can use it as an input to other actions in your flow.