0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

PDF → Encrypt PDF

AI-generated

Overview

The node provides an operation to encrypt PDF files by applying user and optionally owner passwords. It supports inputting the PDF either via a public URL or as binary buffer data. The encrypted PDF can then be returned either as a downloadable URL or presumably as raw data.

This node is useful in scenarios where you need to secure PDF documents before sharing them, ensuring that only authorized users with the password can open or modify the file. For example, companies distributing confidential reports or contracts can use this node to add password protection to PDFs automatically within their workflows.

Properties

Name Meaning
PDF URL Public URL of the PDF file to encrypt
PDF Buffer Binary buffer data of the PDF file to encrypt
Return as URL Whether to return the encrypted PDF as a downloadable URL (true/false)
User Password Password required for user access to open the PDF
Owner Password Optional password granting owner-level access to the PDF (e.g., permissions to edit or print)
File Name Desired name for the output encrypted PDF file

Output

  • The node outputs JSON data representing the result of the encryption operation.
  • If "Return as URL" is enabled, the output will include a URL from which the encrypted PDF can be downloaded.
  • Otherwise, the output likely contains the encrypted PDF data directly (either as base64 or binary).
  • The exact structure is not detailed in the source but typically includes fields such as the encrypted file's URL or its binary content.
  • No explicit mention of binary output handling was found, so binary data is probably encoded within JSON.

Dependencies

  • Requires an API key credential for authentication with the external service at https://prod.0codekit.com.
  • The node sends a POST request to /pdf/encrypt endpoint with the provided parameters.
  • Proper network connectivity and valid credentials are necessary for successful operation.

Troubleshooting

  • Common issues:

    • Providing neither a PDF URL nor a PDF buffer will likely cause errors due to missing input.
    • Incorrect or missing user password will prevent proper encryption.
    • Invalid URLs or inaccessible PDF files may cause request failures.
    • If "Return as URL" is true but the service fails to generate a downloadable link, the output might be empty or error out.
  • Error messages:

    • Authentication errors if the API key is invalid or missing.
    • Validation errors if required parameters like user password are missing.
    • Network or timeout errors if the external service is unreachable.
  • Resolutions:

    • Ensure all required properties are set correctly.
    • Verify the API key credential is configured and valid.
    • Confirm the PDF URL is publicly accessible or provide the PDF as a buffer.
    • Check network connectivity to the external API endpoint.

Links and References

Discussion