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:
- 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.
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.
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
- Prepare and print generic document templates.
- End-users complete, sign, and scan the documents.
- Upload the scanned documents to the flow.
- FlowX validates the template (barcode) and the signatures.
Scenario for FlowX.AI generated documents
- Utilize the Documents plugin to create a document template.
Generating documents based on templates
- Create a process and add a Kafka Send Action to a Send Message Task node. Here you specify the kafka topic (address) where the template will be generated.
The Kafka topic for generating the template must match the topic defined in the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN
variable. DEVELOPER: Refer to the Kafka configuration guide for more details. For additional information, please see the Documents plugin setup guide.
- 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
The data
parameters must be defined in the document template beforehand. For more information, check the WYSIWYG editor section.
- Add a barcode.
- 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 thedata
field
- Add a Receive Message Task node and specify the topic where you want to receive the response.
Ensure that the topic matches the one defined in the KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_OUT
variable.
- 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).
- 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. - Next, send the response to the OCR Kafka topic defined at
KAFKA_TOPIC_OCR_IN
variable (representing the path to the S3 file) - Display the result of the OCR validation on the kafka topic defined at
KAFKA_TOPIC_OCR_OUT
.
Setup guide
OCR plugin setup
DEVELOPER: Refer to the OCR plugin setup guide for detailed instructions on setting up the OCR plugin.
Was this page helpful?