Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node provides a "Protect PDF" operation that applies password protection and permission restrictions to a PDF document. It allows users to secure their PDF files by setting a password and defining what actions are permitted on the protected PDF, such as printing, copying, editing, commenting, and more.
This node is beneficial in scenarios where sensitive or confidential PDF documents need to be shared securely, ensuring only authorized users can access or modify the content. For example, a company might use this node to protect contracts before sending them to clients, or an educational institution could secure exam papers distributed digitally.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to protect. Options: Binary Data (from previous node), Base64 String, URL to PDF file. |
| Input Binary Field | Name of the binary property containing the PDF file (used when Input Data Type is Binary Data). Usually "data". |
| Base64 PDF Content | Base64 encoded string representing the PDF content (used when Input Data Type is Base64 String). |
| PDF URL | URL pointing to the PDF file to protect (used when Input Data Type is URL). |
| Output File Name | Desired filename for the output protected PDF file. Default is "protected_output.pdf". |
| Password | Password to apply to the PDF for protection. This password will be required to open the PDF. |
| PDF Permission | Permissions allowed on the protected PDF. Options include: All, Print, Copy, Edit, Fill Forms, Comment, Assemble. |
| Binary Data Output Name | Custom name for the binary data field in the node's output. Default is "data". |
Output
The node outputs the protected PDF file as binary data under the specified binary data output name (default "data"). The output JSON contains metadata about the processed item, while the binary data holds the actual protected PDF file content ready for further processing or saving.
Dependencies
- Requires an API key credential or authentication token to connect to the external PDF processing service.
- The node depends on the external PDF4me API or similar service to perform the PDF protection operation.
- Proper network access to fetch PDFs from URLs if the input type is URL.
- No additional environment variables are explicitly required beyond standard n8n credentials setup.
Troubleshooting
Common Issues:
- Providing an invalid or inaccessible URL when using URL input type may cause failures.
- Incorrect base64 encoding of the PDF content can lead to errors during processing.
- Using an incorrect binary property name when selecting binary data input will result in missing file errors.
- Insufficient permissions or invalid API credentials will prevent the node from executing successfully.
Error Messages:
- Errors related to "file not found" or "unable to fetch PDF" usually indicate issues with the input source.
- Authentication errors suggest problems with the API key or credential configuration.
- Permission-related errors may occur if unsupported permission options are selected or if the PDF is already encrypted.
Resolutions:
- Verify the correctness and accessibility of URLs or binary fields.
- Ensure base64 strings are properly encoded without extra characters.
- Confirm API credentials are valid and have necessary permissions.
- Check the PDF file is not corrupted or already locked with conflicting settings.
Links and References
- PDF4me API Documentation (for understanding the underlying PDF protection capabilities)
- n8n Documentation on Working with Binary Data
- General information on PDF security and permissions: https://helpx.adobe.com/acrobat/using/security-passwords-permissions.html