Click here to Skip to main content
16,021,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
public void ReadTextFromImage(String ImagePath)
{

try
{






Label lb = new Label();
// // Grab Text From Image
MODI.Document ModiObj = new MODI.Document();
ModiObj.Create(ImagePath);
ModiObj.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);

//Retrieve the text gathered from the image
MODI.Image ModiImageObj = (MODI.Image)ModiObj.Images[0];

Label1.Text = (ModiImageObj.Layout.Text);
string ss = ModiImageObj.Layout.Text;




// get the first MODI.Image object from Modi.Document's Images collection
MODI.Layout layout = ModiImageObj.Layout; // get the Layout property of the Modi.Image object

// ...
// do something with the objects gained from MODI









ModiObj.Close();



}




catch (Exception ex)
{
throw new Exception(ex.Message);
}

}

This Code will run Proper in Local Machine While installing Microsoft Office Document Imaging.
I get this error on online
C#
"Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154".
Posted
Updated 23-Oct-13 1:08am
v3

1 solution

please see the below link of code project. same problem with soultion.

Hope this will help you.

OCR problem on FTP Server[^]

-SG
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900