Barcode reader
Module for recognizing barcodes
See also: Barcode Erkennung (in documents)
Event action – Abstract
Purpose: Detects the barcodes contained from an input document.
The 'Barcode reader' event action detects barcodes from a document and groups them under one or more documents. The detected barcodes are stored in a list under temporary values. Each list entry contains a barcode result object that stores the barcode, its format, and the page on which the barcode was found.
Configuration
Document content
The Document content parameter must provide the document via a value resolver.
Result
A Result variable must be defined via a value resolver, and the documents are stored under this variable.
Barcode filter
Barcode filters are defined by a value resolver. A list of barcode filters is expected. Barcode filters decide which of the barcodes recognized in a file should be processed further. Without a filter, all found barcodes are taken into account. Each barcode filter can contain a default for the Format of the barcode with a regular expression (RegEx). Both criteria are optional. They are AND-linked within the same filter. If several barcode filters are defined, they are OR-linked. A recognized barcode is therefore processed further if it meets all specified criteria for at least one filter.
Barcode pattern
The Barcode pattern is defined by a value resolver. A barcode pattern defines an extended interpretation scheme for the string from the barcode by a combination of plain text (e.g. separators) and placeholders for sections to be included in properties of the document.
See also: Barcode Erkennung (in documents)
Combine barcodes in one document?
This option must be defined via a value resolver. If the barcodes are to be summarized in a document, all recognized barcodes are stored in a list named after the variable defined in result as temporary values under the document.
In combination with 'Split document', the recognized barcodes for each of the saved documents are saved as a list under temporary values.
Split document?
This option must be defined via a value resolver. For each barcode, only one section (in which the barcode was recognized) from the entire document is saved and assigned as a (partial) document.
See also: Barcode Erkennung (in documents)
Skip barcode page?
This option must be defined via a value resolver. The Skip barcode page? option works only in conjunction with the Split document? option. This option controls which pages appear as a partial document.
See also: Barcode Erkennung (in documents)
Example
Configuration:
No events or rules have been defined for Triggering events or for the Validating rule. Actions on passed rule:
|
|
Result:
The following section is displayed in test mode under the 'Variables' tab:
<entry>
<key xsi:type=
"xsd:string"
> result</key>
<value xsi:type=
"list"
>
<entry name=
"BarcodeExamples.pdf"
description=
"Detected Barcodes:CODE39;123ABCabc"
size=
"0"
reference=
""
xsi:type=
"doc:Document"
>
<temporaryValues>
<data>
<entry>
<key xsi:type=
"xsd:string"
>barcodeResults</key>
<value xsi:type=
"list"
>
<entry barcode=
"CODE39"
format=
"CODE_39"
page=
"0"
xsi:type=
"doc:BarcodeResult"
/>
<entry barcode=
"123ABCabc"
format=
"CODE_128"
page=
"1"
xsi:type=
"doc:BarcodeResult"
/>
</value>
</entry>
</data>
</temporaryValues>
<documentContent>JVBERi0xLjcKCjQgMCBvYmoKKElkZW50aXR5KQplbmRvYmoKNSAwIG9iagooQWRvYmUpCmVuZG9iago4IDAgb2JqCjw8Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9MZW5ndGggMTc4MzIwCi9MZW5ndGgx...=</documentContent>
<attributes/>
</entry>
</value>
</entry>
→ Evaluation:
In the example document, barcodes are stored on several pages, sometimes one or more barcodes per page. A document is created and the barcode information found is stored under temporary values. The fact that only one document was created is because of the selected option 'Combine barcodes in one document'. The fact that only two barcodes are in the list is due to the barcode filters created. If the 'Split document?' option had also been selected here, a document would have been created for pages with multiple barcodes and an entry would have been entered in the list under temporary values for each recognized barcode. Otherwise, if only 'Split document?' is selected, one document is created per recognized barcode.