In DotImage version 10.3.1 we updated to version 4 of the GlyphReader engine. Version 4 includes support for 64 bit applications. This article explains how to manage resource loading.
NOTE: anywhere you see "10.3" you can replace with your version so long as it's 10.3 or higher (ex. 10.4, 10.5, 10.6)
External OCR Resources
The GlyphReader is a separate process with which we interface. When you create a DotImage GlyphReaderEngine object, you will need to make this external process and the resources it requires available to your application.
When DotImage is installed, the resources are placed here:
C:\Program Files (x86)\Atalasoft\DotImage 10.3\bin\ (64-bit machines)
C:\Program Files\Atalasoft\DotImage 10.3\bin\(32-bit machines)
Initializing External OCR Resources
The external process and resources need to be available before the GlyphReaderEngine is instantiated. We provide a helper class to point the engine to the external process and required resources. We recommend the loader class is instantiated in a static constructor for the class in which the engine used.
Deploying External OCR Resources
When deploying an application which uses the GlyphReader engine you must deploy the external resources as well. The path to the resources should be specified in the constructor for the GlyphReaderLoader class. You should point the loader to a location which contains a folder named 'OcrResources', which has a folder named 'GlyphReader'. The GlyphReader folder will need to contain the contents of the GlyphReader folder that was installed on your development machine. If you are deploying a 32 bit application, you can exclude the x64 folder in the v4.0 folder. Conversely, if you are deploying a 64 application you can exclude the x86 folder. Regardless of the target architecture, the rest of directory must be deployed as is.
Here is an example...let's say you are deploying a 64 application and put the OcrResources folder in the following location:
Then the constructor for the resource loader should look like this:
GlyphReaderLoader loader = new GlyphReaderLoader(@"C:\Program Files\MyApp\lib\");
The contents of the lib folder should look like this...