←Select platform

SetOcrEngineInstance Method

Summary

Sets the engine instance to use when converting documents using OCR.

Syntax

C#
VB
Java
C++
public void SetOcrEngineInstance( 
   IOcrEngine instance, 
   bool autoDispose 
) 
Public Sub SetOcrEngineInstance( 
   ByVal instance As IOcrEngine, 
   ByVal autoDispose As Boolean 
) 
public:  
   void SetOcrEngineInstance( 
      IOcrEngine^ instance, 
      bool autoDispose 
   ) 
public void setOcrEngineInstance(OcrEngine instance, boolean autoDispose) 

Parameters

instance

The OCR engine instance to use when converting documents. If this is not null, then the engine must be initialized and started.

autoDispose

true to transfer ownership of instance to this document converter

and automatically dispose it when the DocumentConverter is disposed; otherwise, false to not transfer ownership and not dispose instance when this DocumentConverter is disposed.

Remarks

The IOcrEngine instance passed to this method will be used when the DocumentConverter uses OCR for the conversion. This DocumentConverter does not create its own IOcrEngine and will throw an error if the user instruct it to use OCR without a previously set instance.

OcrEngineInstance will return the same value passed for instance.

The previously set IOcrEngine is removed and optionally disposed if it was set with autoDispose value of true. If instance is null, the previously set instance is removed and this DocumentConverter will not have an IOcrEngine instance.

Example

For an example, refer to DocumentConverter.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Documents.Converters Assembly