Leadtools.Document Deprecated as of v16. Refer to: Leadtools.Forms.Ocr | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
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()
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(LeadtoolsExamples.Common.ImagesPath.Path + "OCRDefault.set")

   rasterDocument.FillMethod = RasterDocumentFillMethod.OcrA

   'save updated settings
   rasterDocument.SaveSettings(LeadtoolsExamples.Common.ImagesPath.Path + "OCRsetting.set")

   'load default settings
   rasterDocument.LoadSettings(LeadtoolsExamples.Common.ImagesPath.Path + "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(LeadtoolsExamples.Common.ImagesPath.Path + "OCRDefault.set"); 
 
   rasterDocument.FillMethod = RasterDocumentFillMethod.OcrA; 
 
   // save updated settings 
   rasterDocument.SaveSettings(LeadtoolsExamples.Common.ImagesPath.Path + "OCRsetting.set"); 
 
   // load default settings          
   rasterDocument.LoadSettings(LeadtoolsExamples.Common.ImagesPath.Path + "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 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

The Leadtools.Document namespace is deprecated and no longer supported as of LEADTOOLS v16. For v16 and later, please refer to: Leadtools.Forms.Ocr. This documentation is retained for v15 and earlier informational use only.