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 extracts tables from PDF documents. It is useful when you need to programmatically retrieve tabular data embedded in PDFs for further processing, such as data analysis, reporting, or integration with other systems.

Common scenarios include:

  • Extracting invoice line items from PDF invoices.
  • Retrieving structured data from reports or forms saved as PDFs.
  • Automating data entry by converting PDF tables into JSON or spreadsheet formats.

For example, you can provide a PDF file containing financial statements and extract all tables within it to convert them into structured JSON data for automated accounting workflows.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF file:
• Binary Data (from previous node)
• Base64 String (directly input base64 encoded PDF content)
• URL (link to the PDF file)
Input Binary Field Name of the binary property containing the PDF file (default "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 String.
PDF URL URL pointing to the PDF file to extract tables from. Used only if Input Data Type is URL.
Document Name Name assigned to the document during processing (default "document.pdf"). Useful for identification or logging purposes.
Advanced Options Optional JSON string to specify custom profiles or additional API options. For example, setting output data format or other extraction parameters as per the external API documentation.

Output

The node outputs an array of JSON objects representing the extracted tables from the PDF. Each object typically contains structured data corresponding to one table found in the document.

If the PDF contains multiple tables, each will be represented separately in the output array.

The output json field includes the parsed table data suitable for downstream automation, such as conversion to spreadsheets or database insertion.

No binary data output is produced by this operation.

Dependencies

  • Requires access to an external PDF processing API service capable of extracting tables from PDFs.
  • The node expects proper authentication credentials (e.g., an API key) configured in n8n to communicate with the external service.
  • Network access is needed if providing PDF via URL or when the node fetches the PDF content from external sources.

Troubleshooting

  • Common issues:

    • Providing an invalid or inaccessible PDF URL may cause failures.
    • Incorrect base64 encoding of the PDF content will result in errors.
    • Missing or incorrect binary property name when using binary data input.
    • API authentication failures due to missing or invalid credentials.
  • Error messages:

    • Errors related to "file not found" or "unable to download PDF" indicate problems with the URL or network.
    • "Invalid PDF format" suggests corrupted or unsupported PDF files.
    • Authentication errors require checking API key configuration.
  • Resolutions:

    • Verify the PDF source and ensure accessibility.
    • Confirm base64 strings are correctly encoded.
    • Double-check the binary property name matches the actual input data.
    • Ensure API credentials are set up correctly in n8n.

Links and References

  • PDF4me API Documentation — for advanced profile options and API capabilities related to PDF processing and table extraction.

Discussion