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 "Classify Document" operation that classifies PDF documents using different input methods. It supports providing the PDF file as binary data from a previous node, as a base64 encoded string, or via a URL to the PDF file. This classification can be used in workflows where automated document categorization is needed, such as sorting invoices, contracts, or other document types based on their content.

Practical examples include:

  • Automatically classifying incoming scanned PDFs into categories like invoices, receipts, or contracts.
  • Processing PDFs fetched from URLs and determining their document type for further workflow branching.
  • Using base64 encoded PDF content from external sources to classify documents without saving files locally.

Properties

Name Meaning
Input Data Type Choose how to provide the PDF file to classify. Options: Binary Data (from previous node), Base64 String, URL to PDF file.
Input Binary Field Name of the binary property containing the PDF file (usually "data"). Only shown if Input Data Type is Binary Data.
Base64 PDF Content Base64 encoded PDF document content. Only shown if Input Data Type is Base64 String.
PDF URL URL to the PDF file to classify. Only shown if Input Data Type is URL.
Document Name Name of the document used during processing. Defaults to "document.pdf".
Output Binary Field Name Name of the binary property where the output file will be stored. Defaults to "data".
Advanced Options Collection of advanced options including "Custom Profiles" which allows JSON configuration for custom API call properties.

Output

The node outputs JSON data representing the classification result of the processed PDF document. The exact structure depends on the classification API response but typically includes metadata about the document category or type.

If the node produces binary output, it stores the processed PDF or related file in a binary property named as specified by the "Output Binary Field Name" property.

Dependencies

  • Requires an API key credential for the PDF processing service to authenticate requests.
  • Needs network access to fetch PDFs if the URL input method is used.
  • The node relies on the external PDF4me API for document classification functionality.

Troubleshooting

  • Common issues:

    • Providing an incorrect binary property name when using binary input may cause the node to fail to find the PDF file.
    • Invalid or inaccessible URLs will cause errors when fetching the PDF.
    • Malformed base64 strings will lead to decoding errors.
    • Missing or invalid API credentials will prevent successful API calls.
  • Error messages:

    • "File not found in binary property": Check that the binary property name matches the actual input.
    • "Failed to fetch PDF from URL": Verify the URL is correct and accessible.
    • "Invalid base64 content": Ensure the base64 string is properly encoded.
    • Authentication errors: Confirm the API key credential is configured correctly.

Links and References

Discussion