Dear All,
i have a requirement that is i have a book .the book was going to scan.after scanning i want read the text from that document .i dont know the document format .if its in image or in pdf .please suggest me that what are the posibuliitys .if there any open source free api is avillabel .or if any paid one avillbel . but the data should be exact i want read it .
am using c#.net


Nilesh SawardekarRank #648 · 3.7K reputationPosted Jul 14, 2016, 9:12 AM EDT
alice yangRank #2,329 · 607 reputationPosted Jul 15, 2016, 1:46 AM EDT
Hussam BarouqaRank #6,374 · 268 reputationPosted Feb 9, 2017, 6:43 AM EST
There are free OCR SDKs you can try like MODI, GOCR, and Tesseract. Other answers here have links to Tesseract and MODI. For GOCR, see here: http://jocr.sourceforge.net/index.html
Another option is to use a professional library like LEADTOOLS (https://www.leadtools.com/sdk/recognition-imaging) that has OCR features. (Disclaimer: I work for the company that created this library).
The code to load a PDF (eg: a scanned PDF) as an image and OCR it looks like this:
IOcrEngine _ocrEngine;
_ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);
_ocrEngine.Startup(null, null, null, null);
IOcrDocument ocrDoc = _ocrEngine.DocumentManager.CreateDocument();
ocrDoc.Pages.AddPage(pdfFileName, null);
ocrDoc.Pages[0].Recognize(null);
// Save the result to a memory stream as plain text
System.IO.MemoryStream OcrResultStream = new System.IO.MemoryStream();
ocrDoc.Save(OcrResultStream, Leadtools.Forms.DocumentWriters.DocumentFormat.Text, null);
string txtResult = Encoding.ASCII.GetString(OcrResultStream.ToArray());
_ocrEngine.Shutdown();The toolkit also has features for processing and cleaning document images to improve recognition results.