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




Starts the OCR document engine and initializes the handle.

Syntax

Visual Basic (Declaration) 
Public Sub Startup() 
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
 
instance.Startup()
C# 
public void Startup()
Managed Extensions for C++ 
public: void Startup(); 
C++/CLI 
public:
void Startup(); 

Example

Visual BasicCopy Code
Public Sub StartupExample(ByVal sender As Object, ByVal e As System.EventArgs)
   ' 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
   rasterDocument.Startup()

   rasterDocument.SaveSettings("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRDefault.set")

   rasterDocument.FillMethod = RasterDocumentFillMethod.OcrA

   'save updated settings
   rasterDocument.SaveSettings("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRsetting.set")

   'load default settings
   rasterDocument.LoadSettings("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRDefault.set")
   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void StartupExample(object sender, System.EventArgs e) 

   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
 
   //  Unlock OCR support.  
   //  Note that this is a sample key, which will not work in your toolkit. 
   Leadtools.RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey"); 
 
   rasterDocument.Startup(); 
 
   rasterDocument.SaveSettings(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRDefault.set"); 
 
   rasterDocument.FillMethod = RasterDocumentFillMethod.OcrA; 
 
   // save updated settings 
   rasterDocument.SaveSettings(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRsetting.set"); 
 
   // load default settings          
   rasterDocument.LoadSettings(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\OCRDefault.set"); 
   rasterDocument.Shutdown(); 
}

Remarks

This method must be called before calling any other Leadtools OCR document toolkit method. The user must unlock the OCR document toolkit using the Unlock method. If the OCR document toolkit is locked then the Startup method will fail and will not initialize the OCR document toolkit. This method will load and start the OCR document engine. For each call to Startup there must be a call to the Shutdown method. For more information, refer to Starting and Shutting Down the Engine.

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