Skip to main content
Version: 3.0.0

๐Ÿ“ฆ OCR plugin

The OCR (Optical Character Recognition) plugin is used to easily read barcodes or extract handwritten signatures from .pdf documents.

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.
info

The barcode type supported by the plugin is 1D Code 128, find more information here.

Using OCR pluginโ€‹

You can print generic document templates by either using a specific flow on FLOWX.AI (HTML template) or by using any other document editor.

info

If you choose to use a specific flow on FLOWX.AI, there are some advantages:

  • only one application will be used to manage the templates and the flow
  • you have visibility on the template history upon each version

Use caseโ€‹

  1. Print generic templates.
  2. End-user completes, signs and scans the document.
  3. On the flow, the document is uploaded.
  4. FLOWX validates the template (barcode) and the signatures.

FLOWX.AI generated documents scenarioโ€‹

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

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

info

The Kafka topic where you want to generate the template must match the topic defined on the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN variable. Click here for more details on how to configure kafka topics. For more information, check the Documents plugin setup guide.

  1. Fill in the Message. Values expected in the request body:
  • documentList = list of documents to be generated with properties (name and value 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 be replaced in the document template; the keys used in the map should match the ones defined in the HTML template

info

data parameters must be defined first in the document template that you use. For more information, check the WYSIWYG Editor section.

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

The topic must be the one that is defined at the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_OUT variable.

  1. Add a user task node and configure an Upload file action - the action will send the file on the topic (defined at the KAFKA_TOPIC_DOCUMENT_PERSIST_IN) to the Min.io - storage solution.

  1. The response will be sent back to the Kafka topic defined at 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 Min.io file)
  3. Display the result of the OCR validation at the Kafka topic defined at KAFKA_TOPIC_OCR_OUT.

Setup guideโ€‹

ยปOCR plugin setup

Was this page helpful?