Class OcrProgressEventArgs
- Namespace
- LMKit.Extraction.Ocr
- Assembly
- LM-Kit.NET.dll
Provides data for page-level progress events during OCR-based document conversion operations such as LMKit.Document.Pdf.PdfSearchableMaker and LMKit.Document.Conversion.ImageToSearchablePdf.
public sealed class OcrProgressEventArgs : EventArgs
- Inheritance
-
OcrProgressEventArgs
- Inherited Members
Examples
PdfSearchableMaker.Progress += (sender, e) =>
{
Console.WriteLine(
$"Page {e.PageIndex + 1}/{e.TotalPages} " +
$"({(e.Skipped ? "skipped" : "OCRed")})");
// Cancel after page 10
if (e.PageIndex >= 10)
e.Cancel = true;
};
Properties
- Cancel
Set to
trueto abort processing of remaining pages. The pages already processed (including the current one) are preserved in the output.
- PageIndex
Gets the zero-based index of the page that was just processed.
- Skipped
Gets a value indicating whether the page was skipped because it already contains text and the active strategy decided OCR was not needed.
- TotalPages
Gets the total number of pages to process in this operation.