📦 OCR plugin
The OCR (Optical Character Recognition) plugin is used to easily read barcodes or extract handwritten signatures from .pdf documents.
- 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.
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.
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
- Print generic templates.
- End-user completes, signs and scans the document.
- On the flow, the document is uploaded.
- FLOWX validates the template (barcode) and the signatures.
FLOWX.AI generated documents scenario
- Use the Documents plugin to create a document template.
- 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.
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.
- 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
- 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
data parameters must be defined first in the document template that you use. For more information, check the WYSIWYG Editor section.
- Add a barcode.
- if you want a default barcode, add to the body message the following parameter:
- if you want a custom barcode, set
includeBarCode: falseand fill in the
datayou want to add to it.
- Add a message received event node where you add the topic where you want to receive the response.
The topic must be the one that is defined at the
- 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.
- The response will be sent back to the kafka topic defined at
KAFKA_TOPIC_DOCUMENT_PERSIST_OUTenvironment variable through a callback action/ subprocess.
- Next, send the response to the OCR Kafka topic defined at
KAFKA_TOPIC_OCR_INvariable (representing the path to the Min.io file)
- Display the result of the OCR validation at the kafka topic defined at