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 functionality to read barcodes from images. It supports multiple input methods for the image, including binary data from a previous node, base64 encoded strings, or direct URLs to image files. This flexibility allows users to integrate barcode reading into various workflows where images might come from different sources.

Common scenarios include:

  • Extracting barcode information from scanned documents or photos.
  • Automating inventory management by reading barcodes from product images.
  • Processing shipping labels or tickets that contain barcodes.

Practical example:

  • A user uploads an image containing a barcode in a previous node; this node reads and extracts the barcode data for further processing, such as database lookup or triggering other automation steps.

Properties

Name Meaning
Input Data Type Choose how to provide the image file: "Binary Data" (from previous node), "Base64 String", or "URL".
Input Binary Field Name of the binary property containing the image file (used when Input Data Type is "Binary Data").
Base64 Image Content Base64 encoded string of the image content (used when Input Data Type is "Base64 String").
Image URL URL pointing to the image file (used when Input Data Type is "URL").
Output File Name Filename for the output JSON file containing the barcode data.
Image Type Type of the image file: "JPG" or "PNG".
Async Enable asynchronous processing (true/false).
Binary Data Output Name Custom name for the binary data field in the node's output.

Output

The node outputs JSON data representing the barcode(s) read from the provided image. The exact structure typically includes details about each detected barcode, such as its type, value, and possibly position within the image.

If configured, the node can also output binary data named according to the "Binary Data Output Name" property, which may represent the processed image or related data.

Dependencies

  • Requires access to image data either as binary, base64 string, or via URL.
  • Likely depends on an external barcode reading service or library integrated within the node's internal implementation.
  • No explicit API keys or credentials are shown in the code snippet, but usage might require appropriate authentication if external services are involved.

Troubleshooting

  • Common issues:

    • Providing incorrect input data type or mismatched binary property names can cause failures.
    • Invalid or inaccessible URLs will prevent image retrieval.
    • Unsupported image types or corrupted images may lead to errors or no barcode detection.
  • Error messages:

    • Errors related to missing binary data or invalid base64 strings suggest checking the input configuration.
    • Network errors when using URLs indicate connectivity or permission problems.
    • Barcode not found errors mean the image does not contain detectable barcodes or the barcode is unreadable.
  • Resolutions:

    • Verify the input data matches the selected input type.
    • Ensure URLs are accessible and point directly to valid image files.
    • Use supported image formats (JPG or PNG).
    • Check image quality and barcode visibility.

Links and References

Discussion