Click or drag to resize
OcrApiCreate Method
Create handle to base APIs interface

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version:
public static OcrApi Create()

Return Value

Type: OcrApi
Handle to created base APIs interface

In some cases, library initializer can not find tesseract.dll library to load. A typical example of this situation is a Web application. Web apps is running in a IIS working directory, unlike the classical apps. As a consequence, standard LoadLibrary function can not find the dll during loading process.

In this case, you must explicitly specify the full path to the tesseract.dll file through PathToEngine property.

The initialization algorithm is as follows:

  1. Attempting to load dll from the path which received through PathToEngine property.
  2. Attempting to load dll from x64 or x86 folder.Needed folder automatically detected by based the process compilation mode and operating system.
  3. Attempting to load dll from the working directory of the process which call initialization.
  4. Attempting to load dll from the same directory where placed assembly which call initialization.
  5. Otherwise, initialization error.

See Also