Table of Contents

Property Progress

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

Progress

An optional per-call progress reporter. When set, this callback receives a OcrProgressEventArgs after each page is processed. Set Cancel to true inside the callback to abort remaining pages.

public IProgress<OcrProgressEventArgs> Progress { get; set; }

Property Value

IProgress<OcrProgressEventArgs>

Examples

var options = new PdfSearchableMakerOptions
{
    Progress = new Progress<OcrProgressEventArgs>(e =>
    {
        Console.WriteLine($"Page {e.PageIndex + 1}/{e.TotalPages}");
        if (e.PageIndex >= 99)
            e.Cancel = true;
    })
};

Remarks

This is the recommended way to receive progress. Unlike the static Progress event, this callback is scoped to a single operation and is safe for concurrent or multi-tenant scenarios.

Both mechanisms can be used simultaneously: the per-call callback fires first, then the static event.

Share