Skip to main content
Version: 3.4.x

OCR plugin

The OCR (Optical Character Recognition) plugin is a powerful tool that enables you to read barcodes and extract handwritten signatures from .pdf documents with ease.

Before using the OCR service for reading barcodes and extracting signatures, please note the following requirements:

caution
  • All *.pdf documents that are sent to the OCR service for reading barcodes and extracting handwritten signatures should be scanned at a minimum resolution of 200DPI (approximately 1654x2339 px for A4 pages)
  • Barcode is searched on the top 15% of each image (scanned page)
  • Signatures are detected on boxes with a border: 4px black solid
  • Only two signatures per image (scanned page) are detected.
  • All *.pdf documents should be scanned at a minimum resolution of 200DPI (approximately 1654x2339 px for A4 pages).
  • The barcode is searched in the top 15% of each scanned page.
  • Signatures are detected within boxes with a 4px black solid border.
  • The plugin detects up to two signatures per scanned page.
  • Only two signatures per image (scanned page) are detected.
info

The plugin supports 1D Code 128 barcodes. For more information about this barcode type, please refer to the documentation here.

Using the OCR pluginโ€‹

You can utilize the OCR plugin to process generic document templates by either using a specific flow on FLOWX.AI (HTML template) or any other document editor.

info

Using a specific flow on FLOWX.AI offers several advantages:

  • Centralized management of templates and flows within a single application.
  • Access to template history and version control.

Use caseโ€‹

  1. Prepare and print generic document templates.
  2. End-users complete, sign, and scan the documents.
  3. Upload the scanned documents to the flow.
  4. FLOWX validates the template (barcode) and the signatures.

Scenario for FLOWX.AI generated documentsโ€‹

  1. Utilize the Documents plugin to create a document template.
ยปGenerating documents based on templates

  1. Create a process and add a Kafka Send Action to a Message event send node. Here you specify the kafka topic (address) where the template will be generated.

info

The Kafka topic for generating the template must match the topic defined in the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN variable. Refer to the Kafka configuration guide for more details. For additional information, please see the Documents plugin setup guide.

  1. Fill in the Message. The request body should include the following values:
  • documentList - a list of documents to be generated, including properties such as name and values to be replaced in the document templates
  • customId - client ID
  • templateName - the name of the template to be used
  • language
  • includeBarcode - true/false
  • data - a map containing the values that should replace the placeholders in the document template, the keys used in the map should match those defined in the HTML template

info

The data parameters must be defined in the document template beforehand. For more information, check the WYSIWYG Editor section.

  1. Add a barcode.
info
  • to include a default barcode, add the following parameter to the message body: includeBarCode: true.
  • to include a custom barcode, set includeBarCode: false and provide the desired data in the data field
  1. Add a message received event node and specify the topic where you want to receive the response.
caution

Ensure that the topic matches the one defined in the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_OUT variable.

  1. Add a user task node and configure an Upload file action to send the file (defined by the KAFKA_TOPIC_DOCUMENT_PERSIST_IN variable) to the storage solution (for example, S3).

  1. Next, the response will be sent back to the kafka topic defined by KAFKA_TOPIC_DOCUMENT_PERSIST_OUT environment variable through a callback action/subprocess.
  2. Next, send the response to the OCR Kafka topic defined at KAFKA_TOPIC_OCR_IN variable (representing the path to the S3 file)
  3. Display the result of the OCR validation on the kafka topic defined at KAFKA_TOPIC_OCR_OUT.

Setup guideโ€‹

Refer to the OCR plugin setup guide for detailed instructions on setting up the OCR plugin:

ยปOCR plugin setup

Was this page helpful?