Click here to Skip to main content
16,012,843 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the errror like
C#
Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))


What I have tried:

Bitmap source = new Bitmap(imgset);
Bitmap CroppedImage = source.Clone(new System.Drawing.Rectangle(x, y, width, height), source.PixelFormat);
pictureBox3.Image = new Bitmap(CroppedImage);
source.Dispose();
CroppedImage.Save(@"D:\OCRREAD\" + file_name);
get_file = @"D:\OCRREAD\" + file_name;
MODI.Document objModi = new MODI.Document();
objModi.Create(get_file);
objModi.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);
MODI.Image image = (MODI.Image)objModi.Images[0];
MODI.Layout layout = image.Layout;
ReferenceValue = layout.Text;
File.Delete(get_file);
objModi.Close();
Posted
Updated 29-Aug-16 1:22am

1 solution

Check if the Microsoft Office Document Imaging Components are installed on the other system.

See also https://support.microsoft.com/en-us/kb/982760[^] when the other system uses Office 2010 or newer because MODI has been removed in Office 2010.
 
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