LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
CreateEngine Method
See Also 
Leadtools.Forms.Ocr Namespace > OcrEngineManager Class : CreateEngine Method



engineType
An Leadtools.Forms.Ocr.OcrEngineType enumeration member that specifies the LEADTOOLS OCR engine type to use.
useThunkServer
true to use the LEADTOOLS OCR Thunk Server when loading the engine, otherwise, false. Refer to Multi-Threading with LEADTOOLS OCR for more information.

The CreateEngine Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

engineType
An Leadtools.Forms.Ocr.OcrEngineType enumeration member that specifies the LEADTOOLS OCR engine type to use.
useThunkServer
true to use the LEADTOOLS OCR Thunk Server when loading the engine, otherwise, false. Refer to Multi-Threading with LEADTOOLS OCR for more information.
Creates an instance of IOcrEngine.

Syntax

Visual Basic (Declaration) 
Public Shared Function CreateEngine( _
   ByVal engineType As OcrEngineType, _
   ByVal useThunkServer As Boolean _
) As IOcrEngine
Visual Basic (Usage)Copy Code
Dim engineType As OcrEngineType
Dim useThunkServer As Boolean
Dim value As IOcrEngine
 
value = OcrEngineManager.CreateEngine(engineType, useThunkServer)
C# 
public static IOcrEngine CreateEngine( 
   OcrEngineType engineType,
   bool useThunkServer
)
C++/CLI 
public:
static IOcrEngine^ CreateEngine( 
   OcrEngineType engineType,
   bool useThunkServer
) 

Parameters

engineType
An Leadtools.Forms.Ocr.OcrEngineType enumeration member that specifies the LEADTOOLS OCR engine type to use.
useThunkServer
true to use the LEADTOOLS OCR Thunk Server when loading the engine, otherwise, false. Refer to Multi-Threading with LEADTOOLS OCR for more information.

Return Value

The instance of IOcrEngine that this method creates.

Example

This example will use the LEADTOOLS OCR Plus engine to OCR an image and save it as a PDF file.

Remarks

CreateEngine should be the first method your application calls into the Leadtools.Forms.Ocr assembly. Afterwards, you can use the properties and methods of this interface to perform your OCR tasks.

Based on the engine type passed to the CreateEngine methods, Leadtools.Forms.Ocr.OcrEngineManager will load the OCR engine defined in one of the supporting assemblies and return an interface to IOcrEngine. Use this interface and its included types to start using the Leadtools.Forms.Ocr class library. For more information about the engine types, refer to Leadtools.Forms.Ocr.OcrEngineType.

The CreateEngine method lets you create an instance of IOcrEngine, loading the corresponding Leadtools.Forms.Ocr.[EngineName].dll assembly using the .NET System.Reflection.Assembly.Load(string assemblyString) method. You cannot unload this assembly once it has been successfully loaded.

Depending on your application requirement, platform and OCR engine type; a "thunk" mechanism might be required. Refer to Multi-Threading with LEADTOOLS OCR for more information and on how to use the useThunkServer parameter.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

CreateEngine requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features