How can I pass highlights image area to Microsoft Office Document Imaging (OCR) and get text output as a result?
Or there is any alternative method to recognize the characters and numbers in image?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hjalmar Larsson2 reputationPosted Nov 28, 2013, 4:13 AM EST
There's a good article about using C# with MS Office OCR here:
http://www.codeproject.com/Articles/41709/How-To-Use-Office-2007-OCR-Using-C
However, if you need more control on selecting part of the image and getting only specific text out of it, you might need to use a commercial OCR toolkit, such as the one described here:
http://www.codeproject.com/Articles/317163/OCR-with-LEADTOOLS-The-Better-Choice
Cheers,
Hjalmar
Susanna Moore8 reputationPosted Feb 20, 2014, 4:31 PM EST
buyi wen13 reputationPosted Sep 21, 2015, 5:30 PM EDT
Janat AlJamal114 reputationPosted Nov 3, 2019, 5:38 PM EST
{
engine.Startup(null, null, null, null);
string tifInput = @"INPUT FILE PATH";
string pdfOutput = @"OUTPUT FILE PATH";
using(IOcrDocument document = engine.DocumentManager.CreateDocument())
{
IOcrPage ocrPage = document.Pages.AddPage(tifInput, null);
orcPage.Recognize(null);
document.Save(pdfOutput, DocumentFormat.Pdf, null);
}
ocrEngine.Shutdown();
}