IRONSOFTWAREHOME
超時
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

Dim cancel_time As Integer = 1000

' Opens a Large PDF which may need to be cancelled early
Dim ocrTesseract As New IronTesseract() With {.Language = OcrLanguage.English}
Dim 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()
NuGet Download
PM > Install-Package IronOcr
超時

超時

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

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

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

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

準備開始了嗎?

Nuget Downloads 6,236,385版本:2026.9剛剛發布

Key in blue circle

立即免費取得 30 天試用金鑰

Your trial license will be sent to your email address

無任何限制。100% 解鎖。無需信用卡。

bullet_checked無需信用卡或建立帳號無任何限制。100% 解鎖。無需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
獲取您的無義務諮詢
填寫以下表格或發送電子郵件至sales@ironsoftware.com
您的詳細資訊將始終保密。
被全球數百萬工程師信任
Iron Software的客戶標誌
立即獲取您的30天試用金鑰
無需信用卡或帳戶建立