Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do OCR from VFP (or how to read barcodes)
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01156725
Message ID:
01156764
Views:
88
Salut Eric,

I can use MODI (Microsoft Office Document Imaging) for OCR.
http://office.microsoft.com/en-us/assistance/HP010771031033.aspx
Here is an example on how to use MODI to get information about a TIFF file using the OCR method.
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
>I have a VFP8 application that must be able to associate documents (always the same format) that have been scanned to a file. THe file number is both a number and a bar code on the scanned document.
>
>Any suggestion
>Thks
>Eric
Previous
Reply
Map
View

Click here to load this message in the networking platform