OCR进度和性能跟踪
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

ocrTesseract.OcrProgress += (_, ocrProgressEventsArgs) =>
{
    Console.WriteLine(ocrProgressEventsArgs.ProgressPercent + "%   " + ocrProgressEventsArgs.Duration.TotalSeconds + "s");
};

using var input = new OcrInput();
input.LoadPdf("large.pdf");

// Progress events will fire during the read operation even if the main thread is blocked.
var result = ocrTesseract.Read(input);
NuGet Download
PM > Install-Package IronOcr
OCR进度和性能跟踪

OCR进度和性能跟踪

IronTesseract 对象有一个 OcrProgress 事件,可以用来跟踪OCR进度。 我们可以使用在任何OCR文本页面读取完毕后发送到此事件的 OcrProgressEventArgs 对象来跟踪进度。

这在图形用户界面应用程序、Web 应用程序和命令行界面 (CLI) 中都非常有用,可以让用户了解他们可能需要等待多长时间。

学习如何使用 IronOCR 在 .NET 中跟踪 OCR 进度
在 GitHub 上查看

准备开始了吗?

Nuget Downloads 6,357,159版本:2026.11刚刚发布