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 "Convert To PDF" operation that converts various input file formats into PDF documents. It supports multiple input data types including binary data from previous nodes, base64 encoded strings, and URLs pointing to files. This flexibility allows users to convert documents received in different forms into PDFs for easier sharing, archiving, or further processing.

Common scenarios include:

  • Converting uploaded Word documents or images (provided as binary data) into PDFs.
  • Converting files fetched from external URLs directly into PDFs.
  • Processing base64 encoded content (e.g., from APIs or other integrations) into PDF format.

Practical examples:

  • A user uploads a DOCX file which is passed as binary data; the node converts it to PDF for standardized output.
  • An automation fetches a document URL from an email and converts the linked file to PDF.
  • A system receives base64 encoded content of a report and converts it to PDF for storage.

Properties

Name Meaning
Input Data Type How the input file is provided. Options: Binary Data (from previous node), Base64 String (base64 encoded content), URL (link to the file).
Binary Property Name of the binary property containing the file to convert (used when Input Data Type is Binary Data).
Input File Name Name of the input file including extension. Optional for binary data input (will use filename from binary if not provided). Required for base64 and URL inputs.
Base64 Content Base64 encoded content of the file to convert (required if Input Data Type is Base64 String).
File URL URL of the file to convert to PDF (required if Input Data Type is URL).
Output File Name Desired name for the output PDF file. Defaults to "output.pdf".
Advanced Options Collection of advanced settings, including "Custom Profiles" where JSON can be used to adjust custom properties for the conversion API call.
Binary Data Output Name Custom name for the binary data field in the node's output. Defaults to "data".

Output

The node outputs the converted PDF file as binary data under the specified binary data output name (default "data"). The output includes:

  • json: Metadata about the conversion result (typically minimal or empty).
  • binary: Contains the PDF file data with the specified output file name.

This allows downstream nodes to access the PDF file either for saving, sending, or further processing.

Dependencies

  • Requires an external PDF conversion service accessible via API (implied by references to API calls and profiles).
  • Needs proper API authentication configured in n8n credentials (an API key or token).
  • Network access to URLs if converting from URL input type.

Troubleshooting

  • Missing or incorrect input data: Ensure the input data matches the selected input type (binary, base64, or URL) and required fields like file names are provided.
  • Invalid file format or corrupted input: Conversion may fail if the input file is not supported or corrupted.
  • API authentication errors: Verify that the API key/token is correctly set up and has permissions.
  • Network issues: For URL input, ensure the URL is accessible and returns a valid file.
  • Advanced options JSON syntax errors: If using custom profiles, ensure the JSON is well-formed.

Common error messages will typically relate to invalid input, failed API calls, or missing credentials. Resolving involves checking input correctness, credential setup, and network connectivity.

Links and References

Discussion