0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

PDF → Encrypt

AI-generated

Overview

This node operation encrypts a PDF file by applying user and owner passwords to restrict access and permissions. It supports inputting the PDF either as a public URL or as a buffer. The node can output the encrypted PDF either as a URL or in another specified format. This is useful for scenarios where sensitive PDF documents need to be secured before sharing or storage, such as protecting contracts, reports, or confidential documents.

Use Case Examples

  1. Encrypt a PDF from a public URL with a user password to restrict opening the document.
  2. Encrypt a PDF provided as a buffer and specify both user and owner passwords to control access and permissions.
  3. Output the encrypted PDF as a URL for easy sharing or as a buffer for further processing.

Properties

Name Meaning
URL Public URL of the PDF file to be encrypted.
Buffer Buffer of the PDF file to be encrypted.
Get File as URL Boolean flag indicating whether the encrypted PDF should be returned as a URL.
Filename Filename to assign to the encrypted PDF.
User Password Password required to open the encrypted PDF.
Owner Password Owner password for the encrypted PDF, controlling permissions. Defaults to the user password if not specified.

Output

JSON

  • encryptedPdfUrl - URL of the encrypted PDF if 'Get File as URL' is true.
  • encryptedPdfBuffer - Buffer of the encrypted PDF if 'Get File as URL' is false.

Dependencies

  • Requires an API key credential for the CodeKit API service.

Troubleshooting

  • Ensure the input PDF URL is publicly accessible if using the URL input option.
  • Verify that the buffer input is a valid PDF file buffer.
  • Check that the user and owner passwords meet any required complexity rules.
  • If the node fails, confirm that the API key credential is correctly configured and has permissions for PDF encryption.

Discussion