PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node provides functionality to unlock password-protected PDF files. It supports multiple input methods for the locked PDF, including binary data from a previous node, a base64-encoded string, or a URL pointing to the PDF file. After unlocking the PDF using the provided password, it outputs the unlocked PDF file as binary data.

This node is beneficial in scenarios where automated workflows need to process secured PDFs—such as extracting data, merging, or converting PDFs—that require removing password protection first. For example, a user might receive encrypted invoices via email and want to automatically unlock them before further processing.

Properties

Name Meaning
Input Data Type Method to provide the PDF file to unlock. Options: Binary Data (from previous node), Base64 String (base64 encoded content), URL (link to PDF file).
Input Binary Field Name of the binary property containing the PDF file when using Binary Data input type (default: "data").
Base64 PDF Content Base64 encoded string representing the PDF document content (used if Input Data Type is Base64 String).
PDF URL URL pointing to the PDF file to unlock (used if Input Data Type is URL).
Output File Name Desired filename for the output unlocked PDF file (default: "unlocked_output.pdf").
Password Password string used to unlock the protected PDF (default: "1234").
Binary Data Output Name Custom name for the binary data field in the node's output (default: "data").

Output

The node outputs the unlocked PDF file as binary data under the specified binary data output name (default "data"). The output includes:

  • A JSON object with metadata fields (if any).
  • A binary property containing the unlocked PDF file content, named according to the "Binary Data Output Name" property.
  • The binary data can be used by subsequent nodes for further processing, storage, or transmission.

Dependencies

  • Requires an API key credential or authentication token to access the external PDF unlocking service.
  • The node depends on an external PDF processing service (implied by the imported unlock_pdf action module) to perform the unlocking operation.
  • Proper network access to URLs if the PDF is provided via URL.
  • No additional environment variables are explicitly required beyond standard n8n credentials setup.

Troubleshooting

  • Incorrect Password Error: If the provided password is wrong, the unlocking will fail. Verify the password is correct.
  • Invalid PDF Input: Providing malformed or unsupported PDF content (e.g., corrupted base64 string or inaccessible URL) may cause errors. Ensure the input PDF is valid and accessible.
  • Network Issues: When using URL input, network connectivity problems or invalid URLs can prevent fetching the PDF.
  • Missing Binary Data: If "Binary Data" input type is selected but the specified binary property does not exist or is empty, the node will error. Confirm the binary property name matches the actual input.
  • API Authentication Failures: Errors related to authentication indicate missing or invalid API credentials. Check that the API key or token is correctly configured in n8n.

To resolve errors, check the input parameters carefully, ensure the password is correct, verify network access, and confirm credentials are properly set up.

Links and References

Discussion