Unlock PDF icon

Unlock PDF

Unlock password-protected PDF files using pdfmunk API

Unlock PDF

AI-generated

Overview

This node unlocks password-protected PDF files by removing their password protection using the pdfmunk API. It is useful when you have PDFs that require a password to open, and you want to automate the process of unlocking them for further processing or sharing without manual intervention.

Common scenarios include:

  • Automating document workflows where locked PDFs need to be unlocked before extraction or conversion.
  • Preparing secured PDFs for integration with other systems that do not support password-protected files.
  • Batch unlocking multiple PDFs in an automated pipeline.

For example, you can input a binary PDF file along with its password, and the node will return either a downloadable URL or the unlocked PDF as binary data, depending on your preference.

Properties

Name Meaning
PDF File in Binary Name of the binary property containing the PDF file to unlock (expects base64 encoded data).
Password Password string used to unlock the protected PDF file.
Output Name Desired filename for the unlocked PDF file.
Output Type How to return the unlocked PDF: either as a URL to download or directly as binary data.

Output

The node outputs JSON data containing the response from the pdfmunk API. Depending on the selected output type:

  • If URL is chosen, the JSON includes a URL where the unlocked PDF can be downloaded.
  • If Download is chosen, the node returns the unlocked PDF as binary data attached to the output item.

The output JSON structure reflects the API response and is paired with the corresponding input item index.

Dependencies

  • Requires an active API key credential for the pdfmunk service configured in n8n.
  • Uses the external pdfmunk API endpoint https://pdfmunk.com/api/v1/unlockPdf to perform the unlocking operation.
  • The node expects the input PDF file to be provided as base64-encoded binary data within the specified binary property.

Troubleshooting

  • Invalid binary data error: Occurs if the specified binary property does not contain valid base64 string data. Ensure the input binary property contains properly encoded PDF data.
  • Empty binary data error: Happens if the binary data length is zero. Verify that the input file is correctly loaded and not empty.
  • API request failures: Could be due to invalid API credentials, network issues, or incorrect password for the PDF. Check your API key configuration and confirm the password correctness.
  • Output type mismatch: Make sure to select the appropriate output type based on how you want to receive the unlocked PDF (URL or binary).

If the node is set to continue on failure, errors are returned as JSON objects with an error field instead of stopping execution.

Links and References

Discussion