超時
TimeoutMs 提供一個以毫秒為單位的可選超時設定,超時後將取消OCR讀取操作。
類似於TimeoutMs 也在程式或應用程式卡住的情況下協助讀取大型輸入文件。
請注意,本功能在 .NET Framework 4.x.x 中不被支援。
準備開始了嗎?
Nuget 下載 6,136,090 | 版本: 2026.7 剛剛發布
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();
Imports IronOcr
Private cancel_time As Integer = 1000
' Opens a Large PDF which may need to be cancelled early
Private ocrTesseract As New IronTesseract() With {.Language = OcrLanguage.English}
Private ocrInput = New OcrInput()
ocrInput.LoadPdf("large-report.pdf")
' Starts a read on the PDF using IronOCR with specified cancel time
Dim ocrRead As OcrReadTask = ocrTesseract.ReadAsync(ocrInput, cancel_time)
ocrRead.Wait()
Install-Package IronOcr
TimeoutMs 提供一個以毫秒為單位的可選超時設定,超時後將取消OCR讀取操作。
類似於TimeoutMs 也在程式或應用程式卡住的情況下協助讀取大型輸入文件。
請注意,本功能在 .NET Framework 4.x.x 中不被支援。