Skip to main content
Kofax

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

Article # 3032947 - Page views: 47

Applies to

  • TotalAgility 7.5

Scenario

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.

clipboard_e8bf6163c0709a5d3c4e67ce41227f64f.png

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

Steps

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.

clipboard_e4ac05a05e523a47feee2d429d0aeb854.png

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.

clipboard_e44cf55a3ed8dd0fc92c55b4d29745ddf.png

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.