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

This node operation "Create PDF/A" converts a given PDF file into a PDF/A format, which is a standardized version of PDF designed for long-term archiving and preservation. The node supports multiple input methods to provide the source PDF: binary data from a previous node, a base64 encoded string, or a URL pointing to the PDF file.

Common scenarios where this node is beneficial include:

  • Archiving important documents in a compliant format that ensures future accessibility.
  • Preparing PDFs for legal, governmental, or compliance requirements where PDF/A is mandated.
  • Converting dynamically generated or received PDFs into a standardized archival format.

Practical example:

  • A user receives invoices as PDFs via email (binary data) and wants to archive them in PDF/A-1b format for regulatory compliance.
  • A workflow downloads a PDF report from a URL and converts it to PDF/A-2b with enhanced features before storing it in a document management system.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF file to convert to PDF/A. Options: Binary Data (from previous node), Base64 String (direct content), URL (link to PDF file).
Input Binary Field Name of the binary property containing the PDF file when using Binary Data input type. Usually "data".
Base64 PDF Content Base64 encoded string of the PDF document content when using Base64 input type.
PDF URL URL to the PDF file to convert when using URL input type.
Output File Name Desired name for the output PDF/A file. Defaults to "converted_pdfa.pdf".
Document Name Name of the source PDF file for reference purposes. Defaults to "document.pdf".
PDF/A Compliance Select the PDF/A compliance level for long-term archiving. Options include:
- PDF/A-1a (full compliance with accessibility)
- PDF/A-1b (basic compliance)
- PDF/A-2a, 2b (enhanced compliance)
- PDF/A-3a, 3b (latest compliance with embedded files support)
Advanced Options Collection of additional settings:
- Allow Upgrade: Whether to allow upgrading to a higher PDF/A version if needed (boolean).
- Allow Downgrade: Whether to allow downgrading to a lower PDF/A version if needed (boolean).
- Custom Profiles: JSON string to adjust custom properties for API calls.

Output

The node outputs the converted PDF/A file in the json output field along with its binary data:

  • The main output contains the PDF/A file content, typically as binary data under a specified binary property.
  • The output file will have the name specified by the "Output File Name" property.
  • If applicable, metadata about the conversion or the original document name may be included.
  • Binary data represents the actual PDF/A file ready for download, storage, or further processing.

Dependencies

  • Requires access to an external PDF processing service or API capable of converting PDFs to PDF/A format.
  • Needs proper authentication credentials (e.g., an API key or token) configured in n8n to authorize requests to the PDF conversion service.
  • Network access to fetch PDFs from URLs if the URL input method is used.

Troubleshooting

  • Common issues:

    • Invalid or inaccessible PDF URL leading to failure in fetching the source PDF.
    • Incorrect base64 string format causing decoding errors.
    • Unsupported PDF versions or corrupted PDF files that cannot be converted.
    • Missing or invalid API credentials resulting in authorization errors.
  • Error messages and resolutions:

    • "Failed to fetch PDF from URL": Check the URL validity and network connectivity.
    • "Invalid base64 content": Verify the base64 string is correctly encoded without extra characters.
    • "Conversion failed due to unsupported PDF format": Ensure the input PDF is not corrupted and is supported by the service.
    • "Authentication error": Confirm API credentials are correctly set up in n8n and have necessary permissions.

Links and References

Discussion