Barcode Processing

From LogicalDOC Community Wiki
Jump to navigationJump to search

The Aim: Barcodes and DMS LogicalDOC

The extraction of barcodes is sometimes needed when the Document-Management-System has to handle structured documents as records. The presence of barcodes in such kind of documents can be used to surecly extract informations that can automatically stored as document metadata. In LogicalDOC we have the opportunity to use the most commonly used barcodes to capture more informations about documents without having the user to enter these informations by hand.

Features we want to implement

We want to extract barcodes from documents asynchronously through the scheduled task BarCode Reader, which will check for barcode inside image or pdf file. This files must comply with the configuration parameters set in a specific page in the Administration section. In this page the user can specify:

  • the maximum number of documents that will be processed by the Barcode task
  • inclusions and exclusions of documents that contain specific characters into their titles
  • the templates to which are associated the documents that must be parsed

The barcodes will be associated to the attributes of templates according to the specifications set by the user in another configuration page. On this page, for each template, the user indicates, for each barcode found into the document, which property or attribute of the document will be filled with that barcode. The barcode types that are supported are:

  • UPC-A and UPC-E
  • EAN-8 and EAN-13
  • Code 39
  • Code 93
  • Code 128
  • QR Code
  • ITF
  • Codabar
  • RSS-14 (all variants)
  • Data Matrix
  • PDF 417 ('alpha' quality)
  • Aztec ('alpha' quality)


The barcode can be in any position inside the document and will be searched in this order: first of all from top to down, then from left to right.
Under Administration --> Document Metadata there will be a configuration page similar to the Administration --> Document Metadata --> CustomId page in which the user can perform settings of the template schema. This page is divided into two tabs.
In the first one the user can define the maximum number of documents that will be processed by the Barcode task and the pattern of inclusion and exclusion applied on the document title.
In the second tab the user can perform all templates settings. Through a drop list, the user selects a template, then LogicalDOC shows all the settings already defined for the selected template. The user can add new settings defining patterns separated by ','. In this page there are a number of row equals to the number of barcode that must be parsed into the document with that template.
This patterns consisting of tokens that have codes that identify the properties of a document and the attributes of a template. In this way the user can define the properties or attributes that should be filled by the barcode. The patten can correspond to a singular token or to compositions of tokens. In addition, each barcode can be added to multiple properties or attributes, therefore each barcode can be associated with multiple patterns that are supposed to be separated by ','.
Like the CustomId configuration page, LogicalDOC shows all the possible tokens that the user can use to create the patterns.


In the configuration page of the pattern, the user selects the template Fattura acquisto. Then the user adds a new pattern for each barcode that is present in a document associated with that template. So if a document associated to Fattura acquisto contains 3 barcode, the user must configure 3 pattern.
Suppose that the value of the first barcode must be placed into the 'Title' field of the document and into template attribute 'piva', so its pattern is <tittle>,<piva>.
The value of the second barcode must be placed in the 'Original ID' field of the document and into the template attribute 'ragsoc', so its pattern is <originalId>,<ragsoc>.
Regarding the value of the third barcode the first 8 characters define the value of the template attribute 'date' and the other 9 characters the value of the template attribute 'number' so its pattern is <date:8><number:9>.
When the Barcode Reader task ends, each document associated to the template Fattura acquisto will have the following fields correctly valued:

  • Title (document property)
  • Original ID (document property)
  • piva (template attribute)
  • ragsoc (template attribute)
  • date (template attribute)
  • number (template attribute)

Benefits from Barcodes managed by LogicalDOC-System

With the BarCode parsing feature LogicalDOC move a step towards the management of structured documents for companies that need to manage and sort documents according to barcode released by themselves or applied to input documents received from their customers.

Relases Features

In the future the user can set the barcode parsing over documents inside specific folders.