LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
EnableTrace Property
See Also 
Leadtools.Forms.Ocr Namespace > IOcrAutoRecognizeManager Interface : EnableTrace Property



The EnableTrace Property is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

Gets or sets a value that indicates whether this IOcrAutoRecognizeManager should output debug messages to the standard .NET trace listeners.

Syntax

Visual Basic (Declaration) 
Property EnableTrace As Boolean
Visual Basic (Usage)Copy Code
Dim instance As IOcrAutoRecognizeManager
Dim value As Boolean
 
instance.EnableTrace = value
 
value = instance.EnableTrace
C# 
bool EnableTrace {get; set;}
C++/CLI 
property bool EnableTrace {
   bool get();
   void set (    bool value);
}

Property Value

true if this IOcrAutoRecognizeManager should output debug messages to the standard .NET trace listeners, otherwise; false Default value is false.

Remarks

If the value of this property is set to true, then this IOcrAutoRecognizeManager object will output debug messages with current status (page being loaded, zoned, recognized, saved, etc.) and any erros that may occur to the default .NET trace listener.

For example, to enable tracing to the .NET console, use the following code:

    
            // Trace to the console
            System.Diagnostics.Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
            // Enable tracing in the OCR recognize manager
            ocrAutoRecognizeManager.EnableTrace = true;
            // Run the job
            ocrAutoRecognizeManager.RunJob(ocrJob);
            

  

When tracing is enabled, the engine will use the OcrAutoRecognizeJobData.JobName value when writing trace messages to help easily identity jobs.

For more information on .NET tracing, refer to System.Diagnostics.Trace.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

EnableTrace requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features