Abbyy Flexicapture Scripts


At some point I will go into some depth about how my team and I have implemented an OCR order processing system at PBTI, but I am stuggling to find the time at the moment! When we first started this project though, we found a massive issue finding any pointers on how the scripts are supposed to work. Speaking to anyone they ALWAYS point you back to the company who supplied you the software, and they want to charge £750 a day – eventually we cracked it, there is some samples out there, but they are hard to find!

As with the nature of the OCR beast, you will never get a perfect read, but what you can do is look at the data and identify repeating faults and code around them. This is just a quick sample of how we have cleared some field data and truncated when it finds a carriage return. Hopefully it will get someone started off if nothing else!

Abbyy Flexicapture Script – Amend data

Imports System
Imports Microsoft.VisualBasic

if context.Field(“item_ref”).Value like “*Shipping*” then
context.Field(“item_ref”).Value = “”
:context.Field(“Quantity”).Value = “”
:context.Field(“Description”).Value = “”
:context.Field(“UnitPrice”).Value = “”
:context.Field(“Price”).Value = “”
:context.Field(“TaxAmt”).Value = “”
:context.Field(“TaxRate”).Value = “”
:context.Field(“GrossAmt”).Value = “”

end if

dim pos as integer
pos = context.Field(“Quantity”).Value.IndexOf(ControlChars.Lf.tostring())
if pos <> -1 then
context.Field(“Quantity”).Value = context.Field(“Quantity”).value.substring(0,pos)
end if

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.