Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone done OCR in VFP?
Message
From
19/10/2010 14:24:55
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01486154
Message ID:
01486180
Views:
103
>>A client has requested that we try to automate data entry by allowing them to scan a document containing things like company name, invoice number, billing date, etc. then have our application somehow "read" the data from the scanned file, parse it then store it into our database (VFP tables).
>>
>>Has anyone ever attempted to do this and if so, what tool(s) did you use?
>>How was the result, accuracy of data entry and/or any problems encountered?
>>
>>Any feedback is greatly appreciated.
>>
>>Thanks,
>>Mike
>
>Look into MODI (Microsoft Office Document Imaging). It has a OCR feature:
>http://office.microsoft.com/en-gb/help/about-microsoft-office-document-imaging-HP001077103.aspx
>
>Here is an example:
>
Local miDoc,miLayout,lcStr
>lcStr=''
>CREATE CURSOR mondocument (mondococr m)
>miDoc = Createobject('MODI.Document')
>miDoc.Create( "C:\untitled.tif")
>miDoc.Images(0).OCR
>miLayout = miDoc.Images(0).Layout
>strLayoutInfo ="Language: " + Transform(miLayout.Language )+Chr(13)+Chr(10)
>strLayoutInfo=strLayoutInfo+"Number of characters: " + Transform(miLayout.NumChars)+Chr(13)+Chr(10)
>strLayoutInfo=strLayoutInfo+"Number of fonts: "+ Transform(miLayout.NumFonts )+Chr(13)+Chr(10)
>strLayoutInfo=strLayoutInfo+"Number of words: " + Transform(miLayout.NumWords)+Chr(13)+Chr(10)+Chr(13)+Chr(10)
>strLayoutinfo = strLayoutinfo+miLayout.text
>INSERT INTO mondocument (mondococr) VALUES (strLayoutinfo)
>MODIFY MEMO mondocument.mondococr
Hey Mike,

Thanks for the link and the code. I'll give it a try.

Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform