LEADTOOLS Thunk Server
IMPORTANT: The following discussion is for the LEADTOOLS Plus, Professional and Arabic engines only. The LEADTOOLS Advantage engine supports multi-threading and x64 platform natively and does not require the use of a "thunk server".
The various OCR engines supported by LEAD were designed to work in the following environment:
32-bit process Single-threaded application
In the past, this enforced many restrictions on how you can use the LEADTOOLS OCR engines, for example, you could not use OCR in a server environment where multi-threading is a must, also you could not develop a 64-bit application and link it to the LEADTOOLS OCR class library.
LEAD developed the LEADTOOLS Thunk Server framework to work around these restrictions and enable the OCR engines to work in following environments:
Multi-threaded 32-bit applications Link from a 64-bit process
The LEADTOOLS 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 thunk server in your .NET application, all you have to do is pass true to the useThunkServer parameter to the OcrEngineManager.CreateEngine method. The rest of your application code will remain unaffected. For more information and example code, refer to OcrEngineManager.
Distribution Files
Additional files need to be included in distribution files for your application if you chose to use the LEADTOOLS Thunk Server framework.
If your application is based on the LEADTOOLS .NET class library (Leadtools.Forms.Ocr), then you need to distribute the following files as part of your application:
File | Description |
---|---|
LtThunkServer.exe | COM+ thunk server |
LtDocthunku.dll | Helper for the LEADTOOLS OCR Plus Engine |
LtDocthunk2u.dll | Helper for the LEADTOOLS OCR Professional Engine |
LtDocthunkaru.dll | Helper for the LEADTOOLS OCR Arabic Engine |
If your application is based on the LEADTOOLS CDLL library (Ltdoc and Ltdoc2), then you need 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 |
Starting the LEADTOOLS Thunk Server
The LEADTOOLS Thunk Server is based on COM+ technology. You should register the server as part of the setup procedure for your application. Perform the following steps to register the LEADTOOLS Thunk Server that ships with the LEADTOOLS .NET Class Library:
Go to Windows Command prompt Run the following command:
"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 16.5\Bin\Common\OCR Thunk\LtThunkServer.exe" /regserver
Your application should perform something similar to the above as part of the setup procedure.
Reference
IntroductionGetting Started (Guide to Example Programs)
LEADTOOLS OCR .NET Assemblies
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
Working with OCR Languages
Working With OCR User Dictionaries
Working with OCR Pages
Working with OCR Zones
Recognizing OCR Pages
OCR Confidence Reporting
Using OMR in LEADTOOLS .NET OCR
OCR Languages and Spell Checking
OCR Engine-Specific Settings
OCR Tutorial - Working with Pages
OCR Tutorial - Recognizing Pages
OCR Tutorial - Adding and Painting Zones
OCR Tutorial - Working with Recognition Results
OCR Tutorial - Scanning to Searchable PDF