其他
探索IronOCR的許多其他功能——為您的所有OCR需求提供理想的程式庫!
文件型別支援
1
多頁/幀TIFF和GIF
輕鬆處理以TIFF和GIF格式儲存的多頁文件。 IronOcr在單次操作中閱讀所有頁面或幀,節省了您手動拆分文件的複雜性。
瞭解如何使用:在.NET C#中閱讀多幀/頁GIF和TIFFusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Import TIFF/TIF
using var imageInput = new OcrImageInput("sample.tiff");
// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Import TIFF/TIF
Using imageInput = New OcrImageInput("sample.tiff")
' Perform OCR
Dim ocrResult As OcrResult = ocrTesseract.Read(imageInput)
End Using2
PDF / PDF流
從PDF文件或記憶體流中準確地直接提取文字,輕鬆處理本地和掃描的(基於圖像的)PDF。
瞭解如何使用:在.NET C#中閱讀PDFusing IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add PDF
using var pdfInput = new OcrPdfInput("sample.pdf");
// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(pdfInput);Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add PDF
Using pdfInput As New OcrPdfInput("sample.pdf")
' Perform OCR
Dim ocrResult As OcrResult = ocrTesseract.Read(pdfInput)
End Using3
圖像(jpg, png, bmp)
IronOCR支援所有標準圖像格式,如JPG, PNG和BMP。 只需提供文件路徑,IronOCR將處理剩下的部分。
瞭解如何使用:在.NET C#中閱讀圖像using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("Potter.png");
// Perform OCR
OcrResult ocrResult = ocrTesseract.Read(imageInput);Imports IronOcr
' Instantiate IronTesseract
Dim ocrTesseract As New IronTesseract()
' Add image
Using imageInput = New OcrImageInput("Potter.png")
' Perform OCR
Dim ocrResult As OcrResult = ocrTesseract.Read(imageInput)
End Using
性能提升器
1
多執行緒Tesseract OCR
構建具有完全支援並發處理的高度可擴展、響應快速的應用程式。安全地同時在不同執行緒中處理多個文件,以進行高性能的伺服器端部署。
瞭解如何使用:在C#中使用多執行緒Tesseract OCRusing IronOcr;
var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("sample.pdf");
// Image processing is automatically multi-threaded
ocrInput.Deskew();
// OCR reading is automatically multi-threaded too
var ocrResult = ocrTesseract.Read(ocrInput);Imports IronOcr
Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
ocrInput.LoadPdf("sample.pdf")
' Image processing is automatically multi-threaded
ocrInput.Deskew()
' OCR reading is automatically multi-threaded too
Dim ocrResult = ocrTesseract.Read(ocrInput)
End Using2
放棄令牌
控制長時間運行的OCR任務。 使用放棄令牌可優雅地中止或取消過程,這對於管理資源或實現使用者可取消的操作非常有用。
瞭解如何使用:C# Tesseract放棄令牌using IronOcr;
using System.Threading;
// Opens a Large PDF which may need to be cancelled early
IronTesseract ocrTesseract = new IronTesseract() { Language = OcrLanguage.English };
using var ocrInput = new OcrInput();
ocrInput.LoadPdf("sample.pdf");
// Starts a read on the PDF using IronOCR
OcrReadTask ocrRead = ocrTesseract.ReadAsync(ocrInput);
Thread.Sleep(1000); // Time passes...
// Cancellation Example:
ocrRead.Cancel();
ocrRead.Wait();Imports IronOcr
Imports System.Threading
' Opens a Large PDF which may need to be cancelled early
Dim ocrTesseract As New IronTesseract() With {.Language = OcrLanguage.English}
Using ocrInput As New OcrInput()
ocrInput.LoadPdf("sample.pdf")
' Starts a read on the PDF using IronOCR
Dim ocrRead As OcrReadTask = ocrTesseract.ReadAsync(ocrInput)
Thread.Sleep(1000) ' Time passes...
' Cancellation Example:
ocrRead.Cancel()
ocrRead.Wait()
End Using3
時間限制
防止您的應用程式在困難或損壞的文件上掛起。 為任何OCR過程設置特定的時間限制,以確保更好的資源管理和系統穩定性。
瞭解如何使用:C# Tesseract時間限制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);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)4
OCR過程跟踪
從0%到100%監控OCR操作的實時進度。這使你能夠使用進度條向使用者提供反饋或更好地估計大型工作的完成時間。
瞭解如何使用:在.NET C#中使用進程跟踪using IronOcr;
var ocrTesseract = new IronTesseract();
// Subscribe to OcrProgress event
ocrTesseract.OcrProgress += (_, ocrProgressEventsArgs) =>
{
Console.WriteLine("Progress(%) | Duration");
Console.WriteLine(" " + ocrProgressEventsArgs.ProgressPercent + "% | " + ocrProgressEventsArgs.Duration.TotalSeconds + "s");
};
using var input = new OcrInput();
input.LoadPdf("Experiences-in-Biodiversity-Research-A-Field-Course.pdf");
// Progress events will fire during the read operation
var result = ocrTesseract.Read(input);Imports IronOcr
Dim ocrTesseract = New IronTesseract()
' Subscribe to OcrProgress event
AddHandler ocrTesseract.OcrProgress, Sub(_, ocrProgressEventsArgs)
Console.WriteLine("Progress(%) | Duration")
Console.WriteLine(" " & ocrProgressEventsArgs.ProgressPercent & "% | " & ocrProgressEventsArgs.Duration.TotalSeconds & "s")
End Sub
Using input = New OcrInput()
input.LoadPdf("Experiences-in-Biodiversity-Research-A-Field-Course.pdf")
' Progress events will fire during the read operation
Dim result = ocrTesseract.Read(input)
End Using準備開始了嗎?
Nuget Downloads 6,236,385|版本:2026.9剛剛發布