PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

The node provides a variety of PDF and image processing operations, including the ability to protect PDF documents with password protection and specific permissions. The "Protect PDF" operation allows users to secure a PDF file by applying a password and setting allowed permissions such as printing, copying, editing, and more.

This node is beneficial in scenarios where sensitive PDF documents need to be shared securely, ensuring that only authorized users can access or modify the content. For example, a company might use this node to protect contracts or confidential reports before sending them to clients.

Properties

Name Meaning
Input Data Type Method to provide the PDF file: Binary Data (from previous node), Base64 String, or URL to the PDF file.
Input Binary Field Name of the binary property containing the PDF file when using Binary Data input type (default: "data").
Base64 PDF Content Base64 encoded string representing the PDF document content (used if Input Data Type is Base64).
PDF URL URL pointing to the PDF file to protect (used if Input Data Type is URL).
Output File Name Desired filename for the protected PDF output (default: "protected_output.pdf").
Password Password string to protect the PDF document (default: "1234").
PDF Permission Permissions allowed on the protected PDF. Options include: All, Print, Copy, Edit, Fill Forms, Comment, Assemble.
Binary Data Output Name Custom name for the binary data field in the node's output (default: "data").

Output

The node outputs the protected PDF file as binary data under the specified binary data output name (default "data"). The output JSON contains metadata about the processed file, and the binary data holds the actual protected PDF content ready for further use or download.

If the node supports other operations, their outputs would vary accordingly, but for the "Protect PDF" operation, the main output is the secured PDF binary data.

Dependencies

  • Requires an API key credential or similar authentication token to connect to the external PDF processing service.
  • The node depends on the external PDF processing API to perform the protection operation.
  • Proper network access to fetch PDFs from URLs if the URL input method is used.
  • No additional environment variables are explicitly required beyond standard n8n credential setup.

Troubleshooting

  • Common Issues:

    • Providing an invalid or inaccessible URL for the PDF file will cause failures.
    • Incorrect base64 encoding of the PDF content may result in errors.
    • Using an unsupported permission option or invalid password format could cause the API to reject the request.
    • Missing or incorrect API credentials will prevent the node from executing successfully.
  • Error Messages:

    • Errors related to fetching the PDF from URL usually indicate network issues or invalid URLs.
    • Authentication errors suggest problems with the provided API key or token.
    • Validation errors may occur if the input PDF content is corrupted or improperly formatted.
  • Resolutions:

    • Verify URLs and ensure they are accessible.
    • Confirm base64 strings are correctly encoded.
    • Check API credentials and permissions.
    • Use valid passwords and supported permission options.

Links and References

Discussion