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 or images from different sources into PDFs within an n8n workflow.

Common scenarios where this node is beneficial include:

  • Automating document conversions in workflows, e.g., converting Word documents or images to PDF for archiving.
  • Processing files received as base64 strings or URLs without manual download steps.
  • Integrating with other systems that require PDF format outputs.

Practical example:

  • A user receives a Word document URL via webhook, uses this node to convert it to PDF, then sends the PDF as an email attachment automatically.

Properties

Name Meaning
Input Data Type How to provide the input data. Options:
• Binary Data (use binary data from previous node)
• Base64 String (provide base64 encoded content)
• URL (provide a URL to the file to convert)
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 if using binary data; required if using base64 string or URL input. Helps determine file type during conversion.
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 Name for the output PDF file. Defaults to "output.pdf".
Advanced Options Custom JSON profiles to adjust extra options for the API call. Users can specify advanced settings by providing JSON according to external API documentation.
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 JSON contains metadata about the conversion and the binary data representing the PDF file itself.

If the input was valid and conversion succeeded, the output will contain:

  • A binary property with the PDF file content.
  • Optionally, JSON metadata related to the conversion process.

Dependencies

  • Requires access to an external PDF conversion service API (likely pdf4me.com based on code references).
  • Needs proper API authentication configured in n8n credentials (an API key or token).
  • Network access to fetch files if input is provided as a URL.

Troubleshooting

  • Invalid input data: Ensure the input file exists and is accessible. For binary input, verify the binary property name matches the actual data. For URL input, confirm the URL is reachable and points to a supported file.
  • Missing input file name: When using base64 or URL input types, the input file name is mandatory to identify the file type. Provide a correct filename with extension.
  • API errors: If the external PDF conversion API returns errors, check your API key validity, usage limits, and network connectivity.
  • Output file not generated: Verify that the node’s output binary data name is correctly set and downstream nodes are accessing the right property.
  • Continue On Fail: If enabled, the node will output error details in JSON instead of stopping the workflow, useful for debugging.

Links and References

Discussion