PDF.co API icon

PDF.co API

Generate PDF, extract data from PDF, split PDF, merge PDF, convert PDF. Fill PDF forms, add text and images to pdf and much more with pdf.co!

PDF Security

AI-generated

Overview

This node provides functionality to add or remove security on PDF files by interacting with a PDF processing service. It supports operations to add encryption and set various permissions on a PDF, or to remove existing security from a PDF file. This is useful in scenarios where users need to protect sensitive PDF documents with passwords and restrictions or remove such protections when no longer needed.

Use Case Examples

  1. Adding password protection and restrictions to a PDF invoice before sharing it with clients.
  2. Removing password protection from a PDF document to allow unrestricted access.

Properties

Name Meaning
Authentication Selects the authentication method to use for the API request (API Key or OAuth2).
PDF URL The URL of the PDF file to which security will be added or from which security will be removed.
Operation Mode Specifies whether to add security or remove security from the PDF.
Owner Password The main owner password used for encrypting the document and setting or removing restrictions. Required when adding security.
User Password An optional user password required for viewing and printing the document. Used only when adding security.
Owner/User Password The password required to remove security from the PDF. Required when removing security.
Advanced Options (Add Security) Additional settings for adding security, including encryption algorithm, permissions (e.g., printing, form filling), print quality, output file name, callback URL, link expiration, and custom processing profiles.
Advanced Options (Remove Security) Additional settings for removing security, including output file name, callback URL, link expiration, and custom processing profiles.

Output

JSON

  • url - The URL of the processed PDF file with added or removed security.
  • name - The name of the output PDF file.
  • status - The status of the operation (e.g., success or failure).
  • message - Additional message or information about the operation result.

Dependencies

  • An API key credential or OAuth2 authentication for accessing the PDF processing service.

Troubleshooting

  • Ensure the PDF URL is accessible and correct to avoid file retrieval errors.
  • Verify that the correct owner or user password is provided when adding or removing security to prevent authentication failures.
  • Check that the selected encryption algorithm is supported by the PDF processing service.
  • If using webhook callback, ensure the callback URL is reachable and correctly configured to receive data.

Links

Discussion