其他
探索 IronOCR 的许多其他功能--满足您所有 OCR 需求的理想库!
支持的文件类型
1
多页/帧 TIFF 和 GIF
轻松处理以 TIFF 和 GIF 格式存储的多页文档。IronOcr 一次操作即可读取所有页面或帧,省去了手动分割文件的复杂过程。
了解如何:阅读多帧/页 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 Abort Tokenusing 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 流程跟踪
监控 OCR 操作从 0% 到 100% 的实时进度。这样,您就可以通过进度条向用户提供反馈,或更好地估算大型工作的完成时间。
了解如何:在 .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刚刚发布