Skip to main content

Kofax TotalAgility - How to leverage Enhanced Barcode recognition in 7.5?

Article # 3032947 - Page views: 47

Applies to

  • TotalAgility 7.5


In KTA 7.6 (and higher), the Barcode locator has the option to use both FineReader and Enhanced Barcode (EBC) engines to extract a barcode.


There is a way to leverage this in KTA 7.5 but it's not available out of the box.


Firstly, a separation profile needs to be configured based on the barcode being extracted. In this example, a Data Matrix barcode is used.

Using the regular expression /.^/ as the value search text will tell the engine not to separate the documents.  The separation profile should then be associated with the Classification node.


When classification executes, this will add any found Data Matrix barcodes into the barcode collection.  This can be viewed at page level in the Repository Browser.


The below script will check if the field DataMatrix is empty after extraction.  If so, it will populate the field with the Data Matrix barcodes found during separation.  

Private Sub Document_AfterExtract(ByVal pXDoc As CASCADELib.CscXDocument)
   Dim DataMatrix As CscXDocField
   Set DataMatrix = pXDoc.Fields.ItemByName("DataMatrix")

   If DataMatrix.Text = "" Then
      DataMatrix.Text = pXDoc.Representations(0).Barcodes.ItemByIndex(0).Text
      DataMatrix.ExtractionConfident = True
      DataMatrix.Valid = True
      DataMatrix.Confidence = 1.00
      DataMatrix.PageIndex = 0
      DataMatrix.Left = 0
      DataMatrix.Top = 0
      DataMatrix.Width = 100
      DataMatrix.Height = 100
   End If

End Sub

Note:  This script is only a framework and might need modified based on different requirements.