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 performs text extraction from images using various input methods. It supports extracting text from an image provided as binary data, a base64-encoded string, or a URL pointing to the image file. This functionality is useful in scenarios such as digitizing printed documents, processing scanned forms, or extracting information from images for further automation workflows.

Practical examples include:

  • Extracting text from scanned invoices or receipts to automate accounting processes.
  • Reading text from photographs of documents taken by mobile devices.
  • Processing screenshots or images containing textual data for content analysis.

Properties

Name Meaning
Input Data Type Choose how to provide the image file to extract text from. Options: Binary Data, Base64 String, URL
Input Binary Field Name of the binary property that contains the image file (used when Input Data Type is Binary Data)
Base64 Image Content Base64 encoded image content (used when Input Data Type is Base64 String)
Image URL URL to the image file to extract text from (used when Input Data Type is URL)
Output File Name Name for the output extracted text file in JSON format
Async Enable asynchronous processing (true/false)
Binary Data Output Name Custom name for the binary data in n8n output

Output

The node outputs the extracted text in JSON format. The JSON contains the recognized text content extracted from the input image. Additionally, the output can include binary data named according to the "Binary Data Output Name" property, which holds the extracted text file content.

If asynchronous processing is enabled, the node handles the extraction process without blocking, suitable for larger images or slower OCR services.

Dependencies

  • Requires access to an OCR service or library capable of extracting text from images.
  • The node expects the image input either as binary data from previous nodes, a base64 string, or a publicly accessible URL.
  • No explicit external API keys or credentials are mentioned in the source code snippet; however, depending on the underlying OCR implementation, appropriate authentication might be required and configured within n8n.

Troubleshooting

  • Common issues:

    • Providing an incorrect binary field name will result in failure to locate the image data.
    • Invalid base64 strings or inaccessible URLs will cause errors during text extraction.
    • Large images or slow network connections may lead to timeouts if asynchronous processing is disabled.
  • Error messages:

    • Errors related to missing or invalid input data typically indicate misconfiguration of the input properties.
    • Network errors when using URLs suggest connectivity issues or invalid URLs.
    • OCR service errors may occur if the service is unavailable or the input image format is unsupported.
  • Resolutions:

    • Verify the binary property name matches the actual binary data field.
    • Ensure base64 strings are correctly encoded and complete.
    • Confirm URLs are reachable and point directly to image files.
    • Enable asynchronous processing for large or complex images to avoid timeouts.

Links and References

Discussion