Class OcrCompletedEventArgs
- Namespace
- LMKit.Extraction.Ocr
- Assembly
- LM-Kit.NET.dll
EventArgs for when OCR has completed (either successfully or faulted). If an exception occurred, Result will be null and Exception will be set.
public class OcrCompletedEventArgs : EventArgs
- Inheritance
-
OcrCompletedEventArgs
- Inherited Members
Examples
ocrEngine.OcrCompleted += (sender, e) =>
{
if (e.Exception != null)
Console.WriteLine($"Page {e.PageIndex} failed: {e.Exception.Message}");
else
Console.WriteLine($"Page {e.PageIndex}: {e.Result.PageText.Length} characters recognized");
};
Properties
- Exception
If OCR threw an exception, this property holds it. Null if OCR succeeded or was canceled.
- PageIndex
The zero-based index of the page that was processed.
- Parameters
The parameters that were passed into OCR (image buffer, attachment, etc.).
- Result
The OCR result, if the operation succeeded. Null if OCR failed or was canceled.