About Abbyy OCR Engine

ocr

#1

I’m trying to use Abbyy OCR. I setup a small demo project like this
[(sorry new users can only put 1 image) there was a image showing a demo UiPath project with a read image from file, abbyy ocr and messagebox to show result]
But UiPath keeps telling me this:

Main has thrown an exception
Message: Error performing OCR: AbbyyErrorLoadEngine
Source: Abbyy OCR
Exception Type: Exception
System.Exception: Error performing OCR: AbbyyErrorLoadEngine
Server stack trace:
at UiPath.Vision.OCR.OCRClient.ScrapeUsingHostService(OCRInput input, OCROptions options, CancellationToken cancelToken)
at UiPath.Vision.OCR.OCRClient.Scrape(OCRInput input, OCROptions options, CancellationToken cancelToken, Boolean useHostProcess)
at UiPath.Vision.UiImage.ScrapeOCR(OCROptions options, CancellationToken cancellationToken)
at UiPath.Core.Activities.OCREngineActivity.<>c__DisplayClass36_0.b__0()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

According to previous topic Abbyy OCR Engine
I download and install Abbyy’s File Reader Engine but the problem continues

To make sure the engine is correctly installed, I create a demo c# project and reference the File Reader Engine’s
C# library, like this

var clsid = new Guid("110020D2-0000-1056-976E-008048D53AE3");
var engine_loader_type = Marshal.GetTypeFromCLSID(clsid);
var engine_loader = (IEngineLoader)Activator.CreateInstance(engine_loader_type);
var engine = engine_loader.GetEngineObject("xxxxx-mylicensesn-xxxxxxx");
var license = engine.CurrentLicense;
Console.WriteLine(license.SerialNumber);

At first this program throws this exception when use Activator to create instance:

An unhandled exception of type ‘System.Runtime.InteropServices.COMException’ occurred in mscorlib.dll

Additional information: Retrieving the COM class factory for component with CLSID {110020D2-0000-1056-976E-008048D53AE3} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

I go to my registry and search for the key and find the COM server is installed, I goto the dll’s location and find file exists.

But, the dll file is in Program Files no x86 directory, so I use some pefile reader and find it is a 64bit library, then I checked UiPath’s executable file and find it is a 32bit program

I changed my c#'s project settings and force it to produce 64bit executable file and the problem solves

Then that’s where the problem initially happens: you can not load 64bit library in 32bit program, unless using remote process communication, but the File Reader Engine is a 32bit COM in process server, which can only work after being loaded into the process

I check File Reader Engine’s download options and don’t find a 32bit/64bit option

My question is, is there any quick work around, or it is a bug to be fixed?


#2

Make sure it is the finereader SDK NOT finereader.


#3

Yes it is File Reader Engine and I my demo c# program run correctly