0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

PDF → Decrypt

AI-generated

Overview

This node operation decrypts a PDF file. It accepts either a public URL or a buffer of the encrypted PDF, along with the password required to decrypt it. The user can specify whether they want the decrypted PDF returned as a URL or in another format. This operation is useful for workflows that need to programmatically remove password protection from PDF documents, enabling further processing or access to the content.

Use Case Examples

  1. Decrypt a password-protected PDF file from a public URL by providing the URL and password, then retrieve the decrypted PDF as a URL for further use.
  2. Decrypt a PDF file provided as a buffer with the password, and get the decrypted file in a desired format for downstream processing.

Properties

Name Meaning
Code Variables Variables defined in the code editor for the selected function, used to pass dynamic values.
URL Public URL of the encrypted PDF file to decrypt.
Buffer Buffer of the encrypted PDF file to decrypt.
Get File as URL Boolean flag indicating whether the decrypted PDF should be returned as a URL.
Filename Filename of the PDF file.
The Password Password used to decrypt the PDF file.

Output

JSON

  • decryptedPdfUrl - URL of the decrypted PDF if 'Get File as URL' is true.
  • decryptedPdfBuffer - Buffer of the decrypted PDF if 'Get File as URL' is false or not specified.

Dependencies

  • Requires an API key credential for the 0CodeKit API to perform PDF decryption.

Troubleshooting

  • Ensure the provided password is correct; an incorrect password will cause decryption to fail.
  • Verify that the URL or buffer provided is a valid encrypted PDF file.
  • Check network connectivity if using a URL to fetch the PDF file.
  • If the output is not as expected, verify the 'Get File as URL' flag is set correctly.

Discussion