encrypt_pdf
Add password protection to PDFs by setting user and owner passwords, choosing AES/RC4 encryption, and restricting printing, copying, or editing.
Instructions
Add a password to a PDF.
user_password opens the file; owner_password (defaults to it) controls permissions. algorithm: AES-256 (default), AES-128, RC4-128, RC4-40. allow_print/copy/modify set viewer-enforced restrictions. Use current_password if the input is already encrypted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| algorithm | No | AES-256 | |
| overwrite | No | ||
| allow_copy | No | ||
| input_path | Yes | ||
| allow_print | No | ||
| output_path | No | ||
| allow_modify | No | ||
| user_password | Yes | ||
| owner_password | No | ||
| current_password | No |