The DocumentWriterInstance Property is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.
Gets the instance of the Leadtools.Forms.DocumentWriters.DocumentWriter object being used inside this IOcrEngine.Visual Basic (Declaration) | |
---|---|
ReadOnly Property DocumentWriterInstance As DocumentWriter |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As IOcrEngine Dim value As DocumentWriter value = instance.DocumentWriterInstance |
C# | |
---|---|
DocumentWriter DocumentWriterInstance {get;} |
C++/CLI | |
---|---|
property DocumentWriter^ DocumentWriterInstance { DocumentWriter^ get(); } |
Property Value
The Leadtools.Forms.DocumentWriters.DocumentWriter object being used inside this IOcrEngine.You can pass an instance of an already initialized Leadtools.Forms.DocumentWriters.DocumentWriter object to the Startup method. This Leadtools.Forms.DocumentWriters.DocumentWriter objects will then be used internally by the engine when saving OCR documents to disk or memory. Otherwise, when passing null (Nothing in Visual Basic), the IOcrEngine will create and use its own version of Leadtools.Forms.DocumentWriters.DocumentWriter during the startup procedure.
The internal Leadtools.Forms.DocumentWriters.DocumentWriter object will be disposed of by the engine automatically when Leadtools.Forms.Ocr.IOcrEngine.Shutdown or System.IDisposable.Dispose is called. If you passed your own instance of Leadtools.Forms.DocumentWriters.DocumentWriter, then the engine will not dispose it and you can continue to use it as normal after the engine instance has been disposed. When passing your own instance of Leadtools.Forms.DocumentWriters.DocumentWriter, make sure this instance stays valid as long as the engine is started.
When new IOcrDocument objects are created using the IOcrDocumentManager.CreateDocument, a new object of type Leadtools.Forms.DocumentWriters.DocumentWriter is created by this IOcrEngine, and assigned to IOcrDocument.DocumentWriterInstance. All document creation operation (such as IOcrDocument.Save) that is performed inside by OCR document or objects inside the OCR document will use that object.
If the value of IOcrDocument.UseEngineInstanceOptions is true, then the options will be copied from the engine's Leadtools.Forms.DocumentWriters.DocumentWriter to the document Leadtools.Forms.DocumentWriters.DocumentWriter before any methods is called.
For more information on how this object is used by the OCR engine during its lifetime, refer to OCR Engine and RasterCodecs/DocumentWriter Usage.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7