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 extracts form data from a PDF document. It is useful when you need to programmatically retrieve filled-in form fields from PDFs, such as surveys, applications, contracts, or any interactive PDF forms. This can automate data collection workflows by converting PDF form inputs into structured JSON data for further processing or integration.

Practical examples:

  • Extracting user-submitted data from PDF forms uploaded via a web portal.
  • Processing scanned or digitally filled contract forms to capture key information.
  • Automating extraction of survey responses collected in PDF format.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF file:
• Binary Data (from previous node)
• Base64 String (direct base64 encoded content)
• URL (link to the PDF file)
Input Binary Field Name of the binary property containing the PDF file (usually "data") — used only if Input Data Type is Binary Data
Base64 PDF Content Base64 encoded string of the PDF document content — used only if Input Data Type is Base64
PDF URL URL pointing to the PDF file to extract form data from — used only if Input Data Type is URL
Document Name Name assigned to the document during processing (default "document.pdf")
Advanced Options Custom profiles in JSON format to adjust extra API call properties or specific options for the extraction process. For example, setting output data format or other API-specific parameters. See https://dev.pdf4me.com/apiv2/documentation/

Output

The node outputs JSON data representing the extracted form fields and their values from the PDF. The structure typically includes field names and corresponding user-entered or default values, enabling easy access and manipulation in subsequent workflow steps.

If the PDF contains binary data (e.g., attachments), those are not the focus here; the main output is structured form data in JSON format.

Dependencies

  • Requires an external PDF processing API service capable of extracting form data from PDFs.
  • Needs proper API authentication configured in n8n (such as an API key credential).
  • Internet access may be required if providing PDF via URL.

Troubleshooting

  • Common issues:

    • Incorrect input data type or missing binary property name can cause failures.
    • Invalid or inaccessible PDF URL will result in errors fetching the document.
    • Malformed base64 content will prevent successful decoding and extraction.
    • API authentication errors if credentials are missing or invalid.
  • Error messages and resolutions:

    • "Failed to fetch PDF from URL": Check URL correctness and network accessibility.
    • "Invalid base64 content": Verify that the base64 string is complete and properly encoded.
    • "Missing binary data": Ensure the binary property name matches the actual input binary field.
    • API authentication errors: Confirm API key or token is correctly set up in n8n credentials.

Links and References

Discussion