Barcode Reader allows recognition of any type of barcode existing on the document.
The recognition is done by creating (drawing) a zone on the target barcode. The module will run the recognition over the barcode and return it inside the zone variables as result.
Barcode zone can be drawn of any size because the module will run the search and recognition inside that area detecting all types of barcodes existing in there, also multiple and of different types. A bigger zone is helpful when the barcode position is not secure or it might change, to ensure that the barcode can be detected anyway. A typical example is when using stickers applied by the end-user instead of machine printed barcodes.
Once the zone has been added and a barcode detected that rule will always detect the type of barcode recognized. To detect a different barcode create either a new area in the same position or delete the existing one and create a new one by using the different type of barcode.
By default the module creates automatically variables for every zone inserted with the naming convention, for every zone, of:
- BARCODEXX
Where XX is the incremental number of the zone starting from 0. The variable name can be further customized inside the zone setting.
When processing multipage documents every variable will be extracted on every page and the variable name will be suffixed with _PY which stands for Page Y where Y is the number of the page, example:
BARCODE01_P1
BARCODE02_P2
The variable name without the _PY will still exists and containing the result on the last page of the document.
The left hand side menu shows the available settings section. Settings are displayed according the selected section.
General
This section shows a sample built-in document preview, moreover it allows to load real document samples in order to draw and create the target recognition zones.
On the top bar document controls are available:
• Load Image
Browse to open and load (by uploading to the server) a sample document to render on the preview pane.
The sample document will be saved inside the module settings and reopened the next time the module is configured by using the document file uploaded to the Scanshare data folder.
If the document file has been removed or the Workflow has been exported on a new machine where the sample document file is not existing the preview will render with a big red cross X, however zones are existing and fully working unless they are modified.
• Perform test recognition on inserted zones
When pressing this button, the application will start recognition all configured zones. When all Zones are read, a notification message will be prompted and the zones values will be updated in the zones list in order to check the recognition test results.
• Clear existing zones and automatically search for all barcodes
When pressing this button, the application will clear all existing and configured zones and a recognition on the complete page is done. All recognized barcodes, of any types, will be drawn automatically on the document and the zones automatically added in the zones list with their recognition test results.
• Draw recognize area
With this option, you can manually select an area where the application should read the barcode from. When a barcode is detected, it will automatically be read and show up in the barcodes menu with the recognition result.
• Draw anchor
With this option, you can draw a zone anchor on the document which is colored green rather than yellow as the standard zones.
The Anchor is a special function to verify and correct shifting delta when scanning the documents in order to adjust the zone coordinates considering the scanner shifting.
Anchor can be anything distinguish on the document such as: a customer logo, a header row, a footer section and so on. Make sure the select something which appears on every scanned document and which is good comparable and not mistaken with any other components appearing on the document. It is suggested to don’t include much white space around the real contents on which the zone is drawing to.
The process saves the Anchor zone on the sample document used assumed to be the reference document. For every scanned document the module will search the contents of the Anchor zone and, once located, compare the position to the reference image zone position. Any shifting found between the reference position will be counter applied to the zones position too.
• Delete the selected object
Delete the current selected zone.
Zones can be deleted also with the DEL keyboard key, once selected.
• Fit
Fit the document to the current view.
• One to One
Enlarge the document to the 100% zoom ratio into the current view.
• Zoom In
Zoom In the document into the current view.
• Zoom Out
Zoom out the document into the current view.
• Rotate Clockwise
Rotate clockwise direction the document by a manner of 45 degrees.
• Rotate Counter Clockwise
Rotate counter clockwise direction the document by a manner of the 45 degrees.
• Page
Displays the current preview page number on the total number of pages of the document.
• Previous page / Next page
Load and display the previous or next page preview of the document.
Separator toolbar
On the bottom bar barcode separator controls are available. The controls are helpful to setup a barcode separation without having neither a sample document or a document with a barcode separator to use during scanning.
The process works in cascade by using the first button up to the last one in order.
• Create a separator
By pressing this button, a new separator barcode rule will be created. This button is used to create barcode rule in the zones list without draw the area on the preview. The rule will be automatically configured with the required settings for the barcode separation process.
• Generate a separation page
Pressing this button a new empty PDF document with a separator barcode on it will be generated and loaded in the document preview area.
• Download generated separation page
With this option you can download the PDF generated in the previous step. The PDF can be printed and used as separator in the scanning process, the module is already configured to read and detect this page.
Engine
Search direction
Select the search direction used by the engine to read barcodes on the document. Available options are:
- Horizontal
- Vertical
- HorizontalAndVertical
The search direction is intended from the top left corner of the document and it will affect the order in which the barcodes / zones are found if multiple zones might match multiple barcodes.
Read direction
Select the direction of the recognition process across the page. Available options are:
- Engine default
- Top to bottom
- Left to right
- Right to left
- Bottom to top
The read direction is used in combination of the previous Search direction and based on the combination of both the engine result might be different especially when the barcodes recognition order is important.
Timeout
Specify a maximum amount of time the barcode process should run, after which a timeout will occur terminating the process with an error. To be used to prevent the barcode process might take too long, hang or loop on particular complex or malformed documents.
The timeout value is expressed in seconds.
Barcodes
The table shows a list of all configured barcodes (zones).
The view of the table is very easy and intuitive:
• Variable
The variable assigned to the barcode which will contain the output result of the recognition.
• Text
The recognition result populated when testing or adding the barcodes.
• Id
The id associated with your barcode. It is unique and it is the id of your barcode inside the DB.
• Status
If the barcode is enabled or not, a disabled barcode will not be used. The status of a new barcode is automatically set to true when a new barcode is created. In the barcodes menu you can easily set this to false by clicking on the indicator. The barcode will then be greyed out, the indicator will be gray and set to off and it will be skipped during the recognition.
Barcode
Variable
Enter the name of the variable which will contain the recognition result of this barcode. If the variable is already existing in the current Workflow an error message will prevent the barcode to be saved.
Type
Display, as read-only field, the type of the current barcode recognized by the engine when the barcode has been added.
Please refer to the Barcodes Appendix chapter for the supported barcode types.
Regular expression
Enter a regular expression to perform a match with the barcode result, or click, or click the Variable button to select a variable which will contain a value for the expression.
The match is done on the full barcode result and if the value is not matching the provided regular expression the result will be discarded and the barcode variable will return empty.
For more information on regular expressions please check the Regular Expressions Appendix.
Encoding
Select the encoding of the current barcode data, if different from the default. When customized the extracted barcode raw data will attempted to be converted by using the specified encoding type. Available options are:
- ASCII
- Unicode
- BigEndianUnicode
- UTF7
- UTF8
- UTF32
- Custom
When Custom is selected enter the name of the custom encoding inside the Value field which will appear upon the selection.
All pages
If selected the recognition will run automatically on all pages. When this option is enabled the current variable will always contain the last page result while an automatic variable for every page is created in the form of:
VARIABLENAME_PX
Where the current variable name, either automatic generated or customized, will be suffixed by _PX where X is the number of the page.
Only on page
Enter the number of the page where the current barcode needs to be extracted. This automatically contains the number of the page of the sample document where the barcode has been drawn.
Last page only
If selected the recognition will run only on the last page of the document, whatever number of pages the current document has got.
Fixed search region
If enabled the recognition of the current barcode happens within the drawn area. Otherwise the current barcode will be searched across the complete page, in this case the zone is highlighted in red in the document preview rather than yellow.
The option can be disabled when the barcode position is not known and can change, after configuring the barcode with an existing sample document the option can be disabled to search it on the whole page.
Use as separator
If enabled the current barcode will be used as page separator when successfully. The document is separated at the page where this barcode is successfully read composing the first page of the next part.
The separation output will appear at the output creation for every Connectors while the document will still travel as unique document during the following processing modules.
Remove page
If enabled and the separator has been recognized the current page will be removed rather than being the first page of the next part.
The removal will appear at the output creation for every Connectors while the document will still travel as unique document during the following processing modules with all pages.
The option is valid only when Use as separator is enabled.