超時
using IronOcr;

int cancel_time = 1000;

// Opens a Large PDF which may need to be cancelled early
IronTesseract ocrTesseract = new IronTesseract() { Language = OcrLanguage.English };
var ocrInput = new OcrInput();
ocrInput.LoadPdf("large-report.pdf");

// Starts a read on the PDF using IronOCR with specified cancel time
OcrReadTask ocrRead = ocrTesseract.ReadAsync(ocrInput, cancel_time);
ocrRead.Wait();
NuGet Download
PM > Install-Package IronOcr
超時

超時

TimeoutMs 提供一個以毫秒為單位的可選超時設定,超時後將取消OCR讀取操作。

類似於TimeoutMs 也在程式或應用程式卡住的情況下協助讀取大型輸入文件。

請注意,本功能在 .NET Framework 4.x.x 中不被支援。

使用IronOCR在C#中探索異步OCR處理
在GitHub上查看

準備開始了嗎?

Nuget Downloads 6,337,990版本:2026.10剛剛發布