IMPORTANT: The following discussion is for the LEADTOOLS Arabic engine only. The LEADTOOLS Advantage and Professional engines support multi-threading and x64 platform natively and do not require the use of a "thunk server".
Some OCR engines supported by LEAD are designed to work in the following environment:
32-bit process
Single-threaded application
LEAD developed the LEADTOOLS OCR Thunk Server framework to work around such restrictions and enable the OCR engines to work in the following environments:
Multi-threaded 32-bit applications
Link from a 64-bit process
The LEADTOOLS OCR Thunk Server framework works in the background to isolate the OCR engine in a separate process and marshal the various method calls and data back and forth between the engine and your application. To use the LEADTOOLS OCR Thunk Server in a .NET application, all that is needed is to pass true to the useThunkServer parameter of the OcrEngineManager.CreateEngine method. The rest of your application code remains unaffected. For an in-depth discussion on when to use the Thunk Server and best practices for developing robust, multi-threaded server applications, refer to Multi-Threading with LEADTOOLS OCR.
Additional files need to be included in distribution files for your application when using the LEADTOOLS OCR Thunk Server framework.
If your application is based on the LEADTOOLS .NET class library (Leadtools.Forms.Ocr), then you must distribute the following files as part of your application:
File | Description |
---|---|
LtThunkServer.exe |
COM+ Thunk Server |
If your application is based on the LEADTOOLS CDLL library (Ltdoc2), then you must distribute the above plus the following as part of the distribution files of your application:
File | Description |
---|---|
LtThunkutlu.dll |
32 bit helper DLL for the LEADTOOLS CDLL framework |
LtThunkutlx.dll |
64 bit helper DLL for the LEADTOOLS CDLL framework |
The LEADTOOLS OCR Thunk Server is based on COM+ technology. Register the server as part of the setup procedure for your application. Perform the following steps to register the LEADTOOLS OCR Thunk Server that ships with the LEADTOOLS .NET Class Library:
Run the Windows Command prompt with Administrator privileges
Run the following command:
[LEADTOOLS Installation Folder]"\Bin\Common\LEADTOOLS Thunk\LtThunkServer.exe" /regserver
These are the exact same steps that are used by the LEADTOOLS Installation program during setup. Your application's setup should do something similar.
Getting Started (Guide to Example Programs)
Multi-Threading with LEADTOOLS OCR
Programming with LEADTOOLS .NET OCR
An Overview of OCR Recognition Modules
Creating an OCR Engine Instance
Starting and Shutting Down the OCR Engine
OCR Spell Language Dictionaries
Using OMR in LEADTOOLS .NET OCR
OCR Languages and Spell Checking
OCR Tutorial - Working with Pages
OCR Tutorial - Recognizing Pages
OCR Tutorial - Adding and Painting Zones
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET