Leadtools.Document Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
EnginePath Property
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : EnginePath Property




Gets or sets the path to the folder containing the OCR engine files.

Syntax

Visual Basic (Declaration) 
Public Shared Property EnginePath As String
Visual Basic (Usage)Copy Code
Dim value As String
 
RasterDocumentEngine.EnginePath = value
 
value = RasterDocumentEngine.EnginePath
C# 
public static string EnginePath {get; set;}
Managed Extensions for C++ 
public: __property static string* get_EnginePath();
public: __property static void set_EnginePath( 
   string* value
);
C++/CLI 
public:
static property String^ EnginePath {
   String^ get();
   void set (String^ value);
}

Return Value

The path to the folder containing the OCR engine files.

Example

Visual BasicCopy Code
Public Sub EnginePathExample()
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance

   ' Assume that you copied the LEADTOOLS OCR Module files from "LEADTOOLS"\Redist\Ocr to C:\MyApp\Ocr
   ' Tell LEADTOOLS where to look for the OCR engine files in the new location
   RasterDocumentEngine.EnginePath = "C:\MyApp\Ocr"
   Try
      rasterDocument.Startup()
      '...
      '...
      rasterDocument.Shutdown()
   Catch e1 As Exception
      ' Handle error here
   End Try
End Sub
C#Copy Code
public void EnginePathExample(RasterDocumentEngine ocr) 

   // Tell LEADTOOLS where to look for the OCR engine files in the new location 
   // Assume that you copied the LEADTOOLS OCR Module files from "LEADTOOLS"\Redist\Ocr to C:\MyApp\Ocr 
   RasterDocumentEngine.EnginePath = @"C:\MyApp\Ocr"; 
   try 
   { 
      ocr.Startup(); 
   } 
   catch(Exception) 
   { 
      // Handle error here 
   } 
}

Remarks

The LEADTOOLS OCR Module setup will install the OCR engine files by default to "Installation Path\Bin\Common\OCR" where Installation Path is the root folder where the LEADTOOLS for .NET Class Library is installed (for example, C:\Program Files\LEAD Technologies\LEADTOOLS 15).

If you leave this property empty (or with a null or Nothing in Visual Basic), the LEADTOOLS OCR engine will look for these extra files in the default installation folder specified above.

When you are ready to package your application, you might want to change the location where the LEADTOOLS OCR engine looks for these extra files. You can use this property to do that. Set the path you want before calling the Startup method.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Documentrequires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features