IronOCR 和 Abbyy Finereader 之间的比较
在本文中,我们将比较两种常用的库和应用程序,以便在PDF文档和图像中使用OCR。 这些是:
- ABBYY FineReader PDF软件
- IronOCR
如何在 C# 中使用 Abbyy FineReader SDK
- 安装 Abbyy Finereader SDK 以在 C# 中进行 OCR 操作
- 将图像和 PDF 文档转换为 Microsoft Word、可搜索 PDF、CSV 和文本格式。
- 从 PDF 文件创建可编辑 PDF
- 支持 PDF/A-1 至 PDF/A-3 和 PDF/UA
- 利用最新的基于人工智能的OCR技术,对各种文档进行数字化、检索、编辑、保护、共享和协作处理。
1.简介
1.1 ABBYY FineReader PDF — 简介和特性
ABBYY FineReader PDF是由ABBYY创建的光学字符识别(OCR)应用程序。 它允许我们将图像文档(图片、扫描件、PDF文件)以及屏幕截图转换为可编辑的文件格式,如Microsoft Word、Microsoft Excel、Microsoft PowerPoint、富文本格式、HTML、PDF/A、可搜索的PDF、CSV和文本(纯文本)。
ABBYY FineReader是可用于Windows、Linux和macOS的桌面应用程序。 它还允许为pdf文件创建可编辑的格式。 我们也可以像使用Adobe Acrobat一样阅读PDF文件。 ABBYY FineReader将扫描的文档集成到数字化流程中。
以简单高效的方式管理和完成文档,以节省时间和精力。 以同样的方法处理任何文档,无论是数字创建的还是从纸质转换的。 无需先转换即可更改PDF的文本、表格和完整布局。
ABBYY FineReader PDF可以直接从纸质文档创建超过25种不同文件格式的PDF,或通过几乎任何应用程序打印到PDF打印机。 支持PDF/A-1至PDF/A-3的长期存档,以及PDF/UA确保内容在使用辅助软件(如屏幕阅读器)时可访问。 它还使专业人士能够在数字工作环境中最大程度地提高效率。
使用ABBYY FineReader创建和更新您自己的交互式PDF表单,以成功收集信息和标准化文档。 通过组合各种类型的交互字段、设置操作、编辑现有PDF表单或者向传统PDF添加表单元素来创建表单。
ABBYY FineReader可以立即将纸质文档、扫描件和扫描的PDF转换为可搜索的PDF,使您能够从数字档案中检索文档并访问其中包含的信息。 FineReader PDF支持所有合规级别和PDF/A格式的变体,这是长期存档的行业标准,从PDF/A-1至PDF/A-3。
ABBYY最新的基于AI的OCR技术,FineReader PDF,使得数字化、检索、编辑、保护、共享和协作处理各种类型的文档在同一工作流程中变得更容易。 FineReader还包括文档比较功能,帮助我们比较原始文档以及转换后的PDF和图像文件。
1.2 IronOCR — 简介和特性
IronOCR为使用IronOCR for .NET来从.NET应用程序和网站中读取照片和PDF中的文本内容的工程师提供软件。 它扫描照片中的文本和条形码,并支持全球多个语言; 然后它可以将输出作为纯文本或结构化数据提供。 Iron Software的OCR库可以用于MVC、Web、控制台和桌面.NET应用程序。 对于商业部署,提供开发团队的直接支持的许可。
- 使用最新的Tesseract 5引擎,IronOCR可以从任何图片或PDF格式中读取文本、条形码和QR码。 该库可快速为桌面、控制台和网页应用程序添加OCR功能。
- IronOCR支持125种国际语言。 它还支持自定义语言和词汇表。
- IronOCR可以读取超过20种条形码格式和QR码。
- IronOCR支持多页GIF和TIFF图像格式。
- IronOCR为低质量的扫描图像提供校正功能。
- IronOCR支持多线程——它一次执行一个或多个进程。
- IronOCR可以为页面、段落、行、单词、字符等提供结构化数据输出。
- IronOCR支持各种操作系统,例如Windows、Linux、macOS等。
2. 在Visual Studio中新建项目
打开Visual Studio软件并进入"文件菜单"。 选择"新建项目",然后选择"控制台应用程序"。

输入项目名称,并在相应的文本框中选择文件路径。 然后,单击创建按钮并选择所需的.NET Framework,如下图所示。

Visual Studio项目将现在生成所选应用程序的结构。 如果您选择了控制台、Windows和网页应用程序,它将打开Program.cs文件,您可以在其中输入代码并构建/运行应用程序。

接下来,我们可以添加库来测试代码。
3. 安装
3.1 安装ABBYY FineReader PDF
我们可以在这里下载ABBYY FineReader。

上图显示有两个版本,个人版和企业版,您可以根据需求下载。 选择"下载免费试用"选项。 它会将您重定向到如下图所示的表单:

我们需要填写表单以获取EXE文件位置。 单击下载选项以下载文件。
一旦文件下载完成,我们可以双击EXE文件以开始安装。 完成后,它将显示弹出消息,现在准备就绪可使用。
3.2 安装IronOCR
IronOCR库可以通过四种方式下载和安装。
这些是:
- 使用Visual Studio
- 使用 Visual Studio 命令行
- 从NuGet网站直接下载
- 从IronPDF网站直接下载
3.2.1 使用Visual Studio
Visual Studio软件提供NuGet包管理器选项直接将包安装到解决方案。 下面的截图显示了如何打开NuGet包管理器。

它提供了一个搜索框,以显示NuGet网站上的包列表。在包管理器中,我们需要搜索关键字IronOCR,如下图所示:

从上图中可以获得相关搜索项的列表。 我们需要选择所需的选项将包安装到解决方案中。
3.2.2 使用Visual Studio命令行
在Visual Studio中,转至工具 -> NuGet包管理器 -> 包管理器控制台
在包管理器控制台标签中输入以下行:
Install-Package IronOcr
此命令将下载并安装包到当前项目中,并可以使用。
3.2.3 从NuGet网站直接下载
第三种方法是直接从网站下载NuGet包。
- Navigate to the Link.
- 从右侧菜单中选择下载包选项。
- 双击已下载的包。 它将自动安装。
- 接下来,重新加载解决方案并开始在项目中使用它。
3.2.4 从IronOCR网站直接下载
Click the link here to download the latest package direct from the website. Once downloaded, follow the steps below to add the package to the project.
- 从解决方案窗口右键点击项目。
- 然后,选择"添加引用"选项,并浏览已下载引用的所在位置。
- 然后,单击确定以添加参考。
4. OCR图像
IronOCR和ABBYY FineReader都拥有将图像转换为文本的OCR技术。
4.1 使用ABBYY FineReader PDF
接下来,打开ABBYY FineReader PDF应用程序,它将以多个选项打开,如下图所示。

接下来,从OCR编辑器选项中选择"打开"选项。 这将提示选择图像文件的选项:

选择文件后,它将自动开始将图像扫描为可编辑文本,然后在窗口中显示结果,如下图所示:

上图显示了源图像已转换为可编辑文本。 然而,结果不是太准确。 在对比窗口中右侧显示的ABBYY FineReader PDF应用程序并未识别出一些数字。在左侧是源图像,右侧是OCR转换文本。
4.2 使用IronOCR
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Configure OCR language and Tesseract version
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
// Create a new OcrInput object to manage input images
using (var Input = new OcrInput())
{
// Add an image to the input for processing
Input.AddImage(@"3.png");
// Perform OCR to read text from the image
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
Console.ReadKey();
}// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Configure OCR language and Tesseract version
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
// Create a new OcrInput object to manage input images
using (var Input = new OcrInput())
{
// Add an image to the input for processing
Input.AddImage(@"3.png");
// Perform OCR to read text from the image
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
Console.ReadKey();
}' Create an instance of IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Configure OCR language and Tesseract version
Ocr.Language = OcrLanguage.EnglishBest
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5
' Create a new OcrInput object to manage input images
Using Input = New OcrInput()
' Add an image to the input for processing
Input.AddImage("3.png")
' Perform OCR to read text from the image
Dim Result = Ocr.Read(Input)
' Output the extracted text to the console
Console.WriteLine(Result.Text)
Console.ReadKey()
End Using上面展示的Tesseract 5 API允许我们将图像文件转换为文本。 在上述代码片段中,我们创建了IronTesseract实例。 我们还使用了一个OcrInput对象,它允许我们添加一个或多个图像文件。 在利用OcrInput对象方法AddImage时,我们必须在代码中提供可用图像的路径。 可以添加任意数量的图像。 我们之前构建的IronTesseract对象中的Read功能可以用于执行OCR,通过解析图像文件并将结果提取到OCR结果中。 它能够从图像中提取文本并将其转换为字符串。
我们还可以使用Tesseract添加多帧图像。 AddMultiFrameTiff是进行此操作的另一种方法。 Tesseract库读取图像中的每一帧,每一帧被视为一个独立的页面。 过程中将读取图像的第一帧,然后继续下一个帧,如此进行,直到图像的所有帧都被扫描。 此方法仅支持tiff图像格式。

上图是IronOCR结果的输出,准确地显示数据已正确转换为可编辑文本。
5. OCR PDF文件
IronOCR和ABBYY FineReader PDF有助于将PDF文件转换为可编辑文本。 ABBYY FineReader PDF向用户提供一系列选择,例如保存页面、编辑图像、识别页面等。还提供保存选项,例如txt、文档、HTML格式等。IronOCR也允许我们将转换后的OCR文件保存为HTML、txt、pdf等。
5.1 使用ABBYY FineReader PDF
打开ABBYY FineReader PDF软件。 这将打开一个页面,如下图所示,提供多种选择。

接下来,从OCR编辑器选项中选择"打开"选项。 这将提示您选择图像/PDF的选项。 我们可以选择PDF或图像,也可以选择两个文件。

在选择文件后,点击OK按钮。 它将自动开始将图像扫描为可编辑文本,并在窗口中显示结果,如下图所示。

上图展示了源PDF已转换为可编辑文本。 然而,结果并不完全准确。 ABBYY FineReader PDF应用程序没有识别出一些数字。 在对比窗口中左侧是源PDF,右侧是OCR转换的文本,显示得非常清楚。
5.2 使用IronOCR
我们还可以使用OCRInput来管理PDF文件。 每一页文档都将由Iron Tesseract类读取。 然后将从页面中提取文本。 我们还可以使用名为AddPdf的第二种功能打开受保护的文档,它允许我们将PDF添加到我们的文档列表中(如果受保护,则输入密码)。 以下代码展示了如何打开密码保护的PDF文档:
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input PDFs
using (var Input = new OcrInput())
{
// Add a password-protected PDF to the input
Input.AddPdf("example.pdf", "password");
// Perform OCR to read text from the PDF
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
}// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input PDFs
using (var Input = new OcrInput())
{
// Add a password-protected PDF to the input
Input.AddPdf("example.pdf", "password");
// Perform OCR to read text from the PDF
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
}' Create an instance of IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Create OcrInput to manage input PDFs
Using Input = New OcrInput()
' Add a password-protected PDF to the input
Input.AddPdf("example.pdf", "password")
' Perform OCR to read text from the PDF
Dim Result = Ocr.Read(Input)
' Output the extracted text to the console
Console.WriteLine(Result.Text)
End UsingIron Tesseract还提供以下方法:
AddPdfPageAddPdfPages
我们可以使用AddPdfPage读取和提取PDF文档中单页的内容。 只需指定要提取文本的页码即可。 AddPdfPages允许我们从指定的多页中提取文本。 在IEnumerable<int>中,我们只需指定页数。 我们还必须包含文件位置和扩展名。这在以下代码示例中展示:
// Define numbers representing pages to extract from the PDF
IEnumerable<int> numbers = new List<int> { 2, 8, 10 };
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input PDFs
using (var Input = new OcrInput())
{
// Add a specific page from PDF for OCR
// Input.AddPdfPage("example.pdf", 10);
// Add multiple specific pages from PDF for OCR
// Input.AddPdfPages("example.pdf", numbers);
// Perform OCR to read text from the specified pages
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
// Save the extracted text to a file
Result.SaveAsTextFile("ocrtext.txt");
}// Define numbers representing pages to extract from the PDF
IEnumerable<int> numbers = new List<int> { 2, 8, 10 };
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input PDFs
using (var Input = new OcrInput())
{
// Add a specific page from PDF for OCR
// Input.AddPdfPage("example.pdf", 10);
// Add multiple specific pages from PDF for OCR
// Input.AddPdfPages("example.pdf", numbers);
// Perform OCR to read text from the specified pages
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
// Save the extracted text to a file
Result.SaveAsTextFile("ocrtext.txt");
}' Define numbers representing pages to extract from the PDF
Dim numbers As IEnumerable(Of Integer) = New List(Of Integer) From {2, 8, 10}
' Create an instance of IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Create OcrInput to manage input PDFs
Using Input = New OcrInput()
' Add a specific page from PDF for OCR
' Input.AddPdfPage("example.pdf", 10);
' Add multiple specific pages from PDF for OCR
' Input.AddPdfPages("example.pdf", numbers);
' Perform OCR to read text from the specified pages
Dim Result = Ocr.Read(Input)
' Output the extracted text to the console
Console.WriteLine(Result.Text)
' Save the extracted text to a file
Result.SaveAsTextFile("ocrtext.txt")
End Using使用SaveAsTextFile功能,我们可以将结果存储为文本文件,使我们能够将文件下载到输出目录路径。 此外,我们可以使用SaveAsHocrFile将文件保存为HTML文件。
6. 其他特性
6.1 使用ABBYY FineReader PDF
FineReader具有一些额外选项,如:绘制文本区、绘制图片区、绘制表格区、_绘制识别区_等。这些帮助用户改进OCR的性能。 此外,除了执行OCR操作外,应用程序还允许用户完成合并PDF、分割PDF、编辑PDF等操作。
6.2 使用IronOCR
IronOCR具有独特的功能,允许我们从扫描文档中读取条形码和QR码。 以下代码显示了如何从给定的图像或文档中读取条形码。
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Configure OCR language and barcode reading
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.ReadBarCodes = true;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
// Create OcrInput to manage input images
using (var Input = new OcrInput())
{
// Add an image containing barcodes
Input.AddImage("barcode.gif");
// Perform OCR to read text and barcodes from the image
var Result = Ocr.Read(Input);
// Iterate through detected barcodes and output their values
foreach (var Barcode in Result.Barcodes)
{
Console.WriteLine(Barcode.Value);
}
}// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Configure OCR language and barcode reading
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.ReadBarCodes = true;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
// Create OcrInput to manage input images
using (var Input = new OcrInput())
{
// Add an image containing barcodes
Input.AddImage("barcode.gif");
// Perform OCR to read text and barcodes from the image
var Result = Ocr.Read(Input);
// Iterate through detected barcodes and output their values
foreach (var Barcode in Result.Barcodes)
{
Console.WriteLine(Barcode.Value);
}
}' Create an instance of IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Configure OCR language and barcode reading
Ocr.Language = OcrLanguage.EnglishBest
Ocr.Configuration.ReadBarCodes = True
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5
' Create OcrInput to manage input images
Using Input = New OcrInput()
' Add an image containing barcodes
Input.AddImage("barcode.gif")
' Perform OCR to read text and barcodes from the image
Dim Result = Ocr.Read(Input)
' Iterate through detected barcodes and output their values
For Each Barcode In Result.Barcodes
Console.WriteLine(Barcode.Value)
Next Barcode
End Using以上代码有助于从给定的图像或PDF文档中读取条形码。 它能够从一个页面/图像中读取不止一个条形码。 为了读取条形码,IronOCR具有一个名为Ocr.Configuration.ReadBarCodes的独特设置,帮助读取条形码; 默认值设置为false。
读取输入后,数据将保存在一个名为OCRResult的对象中; 该对象具有一个名为Barcodes的属性,它将所有可用的条形码数据组装成一个列表。通过使用foreach循环,我们可以逐一获取所有条形码的详细信息。 此外,它将扫描条形码并读取条形码的值——在一个过程中完成两项操作!
此外,还支持线程选项,这意味着我们可以同时执行多个OCR过程。IronOCR还能够从指定区域识别特定区域。
// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input images
using (var Input = new OcrInput())
{
// Define a specific rectangular area on the image for OCR
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Add an image specifying the area to be processed
Input.Add("document.png", ContentArea);
// Perform OCR to read text from the specified area
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
}// Create an instance of IronTesseract for OCR operations
var Ocr = new IronTesseract();
// Create OcrInput to manage input images
using (var Input = new OcrInput())
{
// Define a specific rectangular area on the image for OCR
var ContentArea = new System.Drawing.Rectangle() { X = 215, Y = 1250, Height = 280, Width = 1335 };
// Add an image specifying the area to be processed
Input.Add("document.png", ContentArea);
// Perform OCR to read text from the specified area
var Result = Ocr.Read(Input);
// Output the extracted text to the console
Console.WriteLine(Result.Text);
}' Create an instance of IronTesseract for OCR operations
Dim Ocr = New IronTesseract()
' Create OcrInput to manage input images
Using Input = New OcrInput()
' Define a specific rectangular area on the image for OCR
Dim ContentArea = New System.Drawing.Rectangle() With {
.X = 215,
.Y = 1250,
.Height = 280,
.Width = 1335
}
' Add an image specifying the area to be processed
Input.Add("document.png", ContentArea)
' Perform OCR to read text from the specified area
Dim Result = Ocr.Read(Input)
' Output the extracted text to the console
Console.WriteLine(Result.Text)
End Using以上示例代码展示了如何对特定区域进行OCR。 我们只需在图像或PDF中指定矩形区域——IronOCR中的Tesseract引擎启用文本识别。
7. 结论
在.NET Framework上下文中使用IronOCR时,Tesseract简单易用。 它支持多种方式的照片和PDF文档。 它还提供了多个设置来提高Tesseract OCR库的性能。 支持各种语言,以及在一次操作中支持多种语言。 要了解有关Tesseract OCR的更多信息,请访问他们的网站。
ABBYY FineReader PDF是使用人工智能引擎识别图像/PDF文档的软件应用程序。 它还提供了多种设置来提高OCR过程的性能。 此外,它提供选择多语言的选项。 ABBYY FineReader PDF确实在页面转换的使用上有限制。 不同操作系统的价格不同。 To know more about the ABBYY FineReader PDF price details, click here.
在我们的测试中,IronOCR相比ABBYY FineReader PDF展示了更强的性能。 在此对比中呈现的特定测试案例中,低质量图像中的一些字符和数字未被FineReader准确识别,而IronOCR在这些特定情况下提供了更准确的结果。 IronOCR还提供了识别条形码数据和从图像中读取条形码值的附加能力。 IronOCR套餐提供终身许可证,不需持续的费用。 The IronOCR package supports multiple platforms at a single price. To know more about IronOCR price details, click here.
常见问题解答
是什么使得IronOCR成为ABBYY FineReader的更佳替代方案?
IronOCR被认为优于其准确的OCR性能、处理低质量图像的能力以及综合功能,如读取条形码和QR码。它还提供终身许可证,没有持续费用,使其具有成本效益。
IronOCR如何处理低质量图像?
IronOCR提供高级图像校正功能,可以增强低分辨率或低质量扫描图像的质量,从而提高OCR结果的准确性。
IronOCR支持哪些平台?
IronOCR支持多个平台,包括Windows、Linux和macOS,并具有单一的终身许可证。
IronOCR能否对条形码执行OCR?
是的,IronOCR可以通过配置库以使用其OCR功能检测和提取条形码值,从而读取图像中的条形码。
使用IronOCR的多线程功能有哪些好处?
IronOCR中的多线程功能允许多个OCR进程同时运行,大大提高了性能和处理速度。
IronOCR支持哪些语言?
IronOCR支持125种不同语言的OCR,使其成为全球应用的多功能工具。
IronOCR的许可与ABBYY FineReader的许可相比如何?
IronOCR提供终身许可证,没有持续费用,而ABBYY FineReader的价格可能会根据操作系统有所不同,可能涉及持续费用。
如何将IronOCR集成到我的C#项目中?
您可以使用Visual Studio、Visual Studio命令行或从NuGet网站下载将IronOCR集成到您的C#项目中。
使用IronOCR可以转换哪些文件格式?
IronOCR可以将图像和PDF转换为多种可编辑格式,包括Microsoft Word、Excel和可搜索的PDF。
为什么在读取QR码时首选IronOCR?
由于其高精度和强大的功能集,包括处理广泛的图像格式和质量级别的能力,IronOCR在读取QR码时被优选。






