Actions19
- AI Invoice Parser
- URL/HTML to PDF
- Merge PDF
- Split PDF
- Convert To PDF
- Convert From PDF
- Add Text/Images to PDF
- Fill a PDF Form
- PDF Information & Form Fields
- Compress PDF
- PDF Security
- Rotate PDF Pages
- Delete PDF Pages
- Search in PDF
- Search & Replace Text or Delete
- Barcode Reader
- Barcode Generator
- Make PDF Searchable or Unsearchable
- Upload File
Overview
This node provides functionality to add or remove security on PDF files by interacting with an external PDF processing service. It is useful in scenarios where you need to protect sensitive PDF documents by setting owner and user passwords, or conversely, when you want to remove existing password protection from PDFs.
Practical examples include:
- Adding encryption and access restrictions to invoices or contracts before sharing them.
- Removing password protection from PDFs received from clients to enable easier processing or editing.
Properties
| Name | Meaning |
|---|---|
| Url | The URL of the PDF file to which security will be added or from which security will be removed. |
| Operation Mode | Choose between "Add Security" (to encrypt and restrict the PDF) or "Remove Security" (to decrypt and remove restrictions). |
| Owner Password | The password for the owner of the PDF, required when adding security. This password typically allows full permissions. |
| User Password | The password for the user of the PDF, required when adding security. This password usually grants limited access based on permissions set. |
| Owner/User Password | The password needed to remove security from the PDF, required when removing security. |
| Advanced Options (Add) | Additional settings when adding security: - Encryption Algorithm: AES 128bit, AES 256bit, RC4 40bit, RC4 128bit - Permissions such as allowing accessibility support, document assembly, printing, form filling, document modification, content extraction, annotation modification - Print Quality: High or Low resolution - File Name: name of the output file - Webhook URL: callback URL to receive output data - Output Links Expiration: time in minutes before output link expires - Custom Profiles: JSON string to specify extra API options |
| Advanced Options (Remove) | Additional settings when removing security: - File Name: name of the output file - Webhook URL: callback URL to receive output data - Output Links Expiration: time in minutes before output link expires - Custom Profiles: JSON string to specify extra API options |
Output
The node outputs a JSON object containing information about the processed PDF file. This typically includes links or references to the secured or unsecured PDF file generated by the operation. If a webhook URL is provided, the output may be delivered asynchronously via that callback.
If binary data output is supported, it would represent the actual PDF file content after applying or removing security, but this is not explicitly detailed in the source code snippet.
Dependencies
- Requires an external PDF processing API service capable of adding/removing PDF security.
- Needs configuration of an API key credential or authentication token to authorize requests to the PDF service.
- Optional webhook URL can be configured to receive asynchronous callbacks with the output data.
- May require environment variables or n8n credentials to store API keys securely.
Troubleshooting
- Invalid Password Errors: When removing security, providing an incorrect owner/user password will cause failure. Ensure the correct password is supplied.
- URL Accessibility: The PDF URL must be publicly accessible or accessible by the API service; otherwise, the operation will fail.
- Permission Settings Conflicts: When adding security, incompatible permission flags or unsupported encryption algorithms might cause errors.
- Webhook Failures: If a webhook URL is provided but unreachable or misconfigured, output delivery will fail.
- API Limits: Exceeding API usage limits or missing API credentials will result in authorization errors.
To resolve these issues:
- Double-check passwords and URLs.
- Verify API credentials and permissions.
- Test webhook endpoints independently.
- Review API documentation for supported encryption and permission options.
Links and References
- PDF.co API Profiles Documentation — for customizing advanced options and profiles.
- General PDF security concepts: https://en.wikipedia.org/wiki/PDF_encryption