与其他组件比较

IronBarcode与Dynamsoft Barcode Reader的对比

发布 2022年五月27日
分享:

1.导言

什么是条形码?条形码是一个正方形或长方形的图片,由一连串平行的黑线和长短不一的白线组成,可以用扫描仪读取。产品贴上条形码标签,更容易识别。条形码被广泛应用于各种场合,包括零售企业的采购流程、仓库的库存管理以及账单的会计处理。

您可以使用 .NET 平台读取和生成条形码吗?是的,您可以使用 .NET 框架来创建和扫描条形码。在本文中,我们将探讨开发人员如何在 .NET 语言环境中制作和扫描条形码。我们将讨论和比较开发人员用来处理条形码的两个软件程序。这些都是您需要的工具:

  • IronBarcode
  • Dynamsoft 条码阅读器 SDK

2.铁条码

IronBarcode 是一种用于读取和创建条形码的 .NET 库。IronBarcode 是一个流行的 .NET 条码库,可创建各种一维和二维条码,以及可定制的条码。 (彩色和品牌) QR 码IronBarcode 允许程序员使用任何 .NET 语言。

IronBarcode 兼容 .NET Core 2x 和 3x、.NET Standard、.NET Framework 4x 和 Azure。它能生成 postscript 输出,并使用多种标准代码转换文本字符串。

2.1.IronBarcode 功能

2.1.1.条码格式

  • 二维矩阵条形码格式包括 QR 码、Aztec 和 Data Matrix .NET 读取和创建。
  • 支持文本、数字和二进制数据的现代线性条形码格式包括 PDF417、Code 39、Code 128 条形码生成器 for C#。

  • 仅支持数字编码的旧式线性条形码格式,包括 UPC-A、UPC-E、EAN-8、EAN-13、Codabar、ITF、MSI 和 Plessey。

2.1.2.条码读取功能

  • IronBarcode.BarcodeReader 静态类 API 将条形码和 QR 码读取简化为一行代码。
  • 支持从 Jpeg、Jpeg2000、Png、BMP、多页 Tiff 和 Gif 图像格式文件中读取条形码。
  • 更高的准确性和性能。为提高准确性和性能,可让阅读器扫描一种、几种或所有条形码格式。
  • 读取条形码的图像校正。要解释错误的扫描和图像,可对文档进行噪点和对比度调整。

2.1.3.条码书写功能

  • BarcodeWriter 和 QRCodeWriter 静态类用于创建容错条形码和 QR 写入 API。条形码数据通常只需两行代码即可提取。
  • IronBarcode 允许用户导出为图像、导出为 HTML 页面、导出为 PDF 或添加到现有 PDF 中。

  • QRCodeWriter 类为渲染 QR 代码提供了高级功能支持。

3.Dynamsoft 条码阅读器 SDK

开发人员可使用 Dynamsoft Barcode Reader 将一维和二维条形码扫描快速集成到他们在各种平台上运行的程序中。除了扫描线性条形码外,它还可用作强大的 QR 码阅读器或二维成像器。

Dynamsoft 的条形码扫描 SDK 是业内最好的。它可以轻松应对各种情况,包括

  • 扫描手机视频广播。
  • 扫描工业相机拍摄的高分辨率静态图片。

  • 扫描巨幅照片和 PDF 文件的自动桌面服务。

3.1.Dynasoft 条码阅读器功能

3.1.1.条码读取功能

  • 在多个线程中处理条形码
  • 一张图片可读取多个条形码。
  • 可在任何方向和旋转角度检测条形码。
  • 从模糊、失焦的照片中解码条形码。

  • 通过预处理,可从低质量照片中读取条形码。

3.1.2.定制和灵活性

本 SDK 采用默认扫描设置,在许多典型情况下都能很好地工作,但为了使您的独特业务需求获得最佳性能,本 SDK 完全可以调整,以便为您专门优化性能。从大量参数列表中进行选择,每个参数都包含各种模式。模式是条码阅读器可执行的一种特定功能,每种模式都可包含许多参数,可用于进一步微调或个性化应用程序。

3.1.3.使用图像处理

Dynamsoft 条码阅读器 SDK 包含一个在其他任何条码 SDK 中都没有的功能。开发人员可使用该功能从解码过程中获取多个数据点。这些 "中间图片结果 "包含高级用户可用于提高效率或在其他工作流程中生成新应用程序的数据。在解码条形码的过程中,会生成许多不同类型的中间图片输出。

3.1.4.从图像和 PDF 文件中解码条形码

  • 图像文件类型包括 BMP、jpg、png、gif 和 Tiff。
  • 单页和多页 PDF 文件。
  • DIB (独立于设备的位图) 从照相机或扫描仪中提取的格式。
  • 图像的 base64 字符串编码。

  • 图像文件流的原始缓冲区。

3.1.5.支持的条形码类型

Dynamsoft 条码阅读器 SDK 是一款可靠的条码扫描器软件,可为各种类型的条码提供条码读取功能。

  • 线性条码 (1D)
  • 二维条形码
  • GS1 复合码
  • 补丁码
  • 药典
  • GS1 数据条

  • 邮政编码

4.在 Visual Studio 中创建新项目

打开 Visual Studio 软件,进入文件菜单。选择 "新建项目",然后选择控制台应用程序。

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

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

现在我们可以添加库并测试程序了。

5.安装 IronBarcode 库

IronBarcode 库可通过四种不同方式下载和安装。它们是

  • 使用 Visual Studio NuGet 软件包管理器
  • 使用 Visual Studio 命令行
  • 从 NuGet 网页直接下载。
  • 从 IronBarcode 网页直接下载。

5.1 使用 Visual Studio NuGet 包管理器

Visual Studio 软件提供了 NuGet 包管理器选项,可直接将软件包安装到解决方案中。下面的截图显示了如何打开 NuGet 包管理器。

它提供了一个搜索框,用于显示 NuGet 网站上可用的软件包库列表。在软件包管理器中,我们需要搜索关键字 "IronBarCode",如下图所示:

从上图中,我们可以看到搜索列表中的相关软件包列表。我们需要选择 IronBarcode 选项,并在解决方案中安装该软件包。

5.2 使用 Visual Studio 命令行

在 Visual Studio 菜单中,转到工具-> NuGet 包管理器-> 包管理器控制台。

在包管理器控制台选项卡中输入以下一行:

Install-Package BarCode

现在,软件包将下载/安装到当前项目,并可随时使用。

5.3 从 NuGet 网站直接下载

第三种方法是直接从网站下载软件包。

  • 导航至 链接.
  • 从右侧菜单中选择下载软件包选项。
  • 双击下载的软件包。软件包将自动安装。
  • 现在重新加载解决方案并开始在项目中使用。

5.4 从 IronBarcode 网站直接下载

点击 链接 从网站下载最新软件包。下载完成后,按照以下步骤将软件包添加到项目中。

  • 在解决方案窗口中右键单击项目。
  • 然后,选择参考选项并浏览下载参考的位置。

  • 然后,单击 "确定 "添加引用。

6.安装 Dynamsoft 条码阅读器

IronBarCode 库可通过四种不同方式下载和安装。它们是

  • 使用 Visual Studio NuGet 软件包管理器
  • 使用 Visual Studio 命令行
  • 从 NuGet 网页直接下载。
  • 从 Dynamsoft 网页直接下载。

6.1 使用 Visual Studio NuGet 软件包管理器

Dynamsoft 条码阅读器使开发人员能够使用 Visual Studio NuGet 包管理器轻松地将其工具集成到 .NET 项目中。请按照以下步骤操作:

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

在上图中,我们可以看到搜索到的相关软件包列表。我们需要选择 Dynamsoft 选项并将软件包安装到我们的解决方案中。

6.2 使用 Visual Studio 命令行

在 Visual Studio 菜单中,转到工具-> NuGet 包管理器-> 包管理器控制台

在软件包管理器控制台选项卡中输入以下一行:

Install-Package Dynamsoft.DotNet.Barcode

现在,软件包将下载/安装到当前项目,并可随时使用。

6.3 从 NuGet 网站直接下载

第三种方法是直接从网页上下载 NuGet 软件包。

6.4 从 Dynamsoft 网站直接下载

点击 链接 这里直接从网页下载最新软件包。下载完成后,请按照以下步骤将软件包添加到项目中。

  • 在解决方案窗口中右键单击项目。
  • 然后,选择参考选项并浏览下载参考的位置。

  • 然后,单击 "确定 "添加引用。

7.读取条形码

读取条形码以获取其中的信息非常有用。本节我们将讨论这些工具如何读取不同的条形码。

7.1.使用 IronBarcode 读取条形码

条码阅读器是一个读取条码的脚本。IronBarCode 命名空间的 QuicklyReadOneBarcode 函数是在 .NET 框架中读取条形码的绝佳工具。我们可以通过选择条形码编码方案来大大提高速度,还可以通过将 TryHarder 选项设置为 True 来强制它自动调整透视和数字噪声。

QuicklyReadAllBarcodes 技术与此类似,但它可以扫描 PDF 和多页 TIFF 等多页文档的多个条形码。

using IronBarCode;
using System;
using System.Drawing;
BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("QR.png");
if (QRResult != null)
{
    string Value = QRResult.Value;
    Bitmap Img = QRResult.BarcodeImage;
    BarcodeEncoding BarcodeType = QRResult.BarcodeType;
    byte [] Binary = QRResult.BinaryValue;
    Console.WriteLine(QRResult.Value);
}
using IronBarCode;
using System;
using System.Drawing;
BarcodeResult QRResult = BarcodeReader.QuicklyReadOneBarcode("QR.png");
if (QRResult != null)
{
    string Value = QRResult.Value;
    Bitmap Img = QRResult.BarcodeImage;
    BarcodeEncoding BarcodeType = QRResult.BarcodeType;
    byte [] Binary = QRResult.BinaryValue;
    Console.WriteLine(QRResult.Value);
}
Imports IronBarCode
Imports System
Imports System.Drawing
Private QRResult As BarcodeResult = BarcodeReader.QuicklyReadOneBarcode("QR.png")
If QRResult IsNot Nothing Then
	Dim Value As String = QRResult.Value
	Dim Img As Bitmap = QRResult.BarcodeImage
	Dim BarcodeType As BarcodeEncoding = QRResult.BarcodeType
	Dim Binary() As Byte = QRResult.BinaryValue
	Console.WriteLine(QRResult.Value)
End If
VB   C#

7.2.使用 Dynamsoft 条码软件读取条码

Dynamsoft 条码阅读器提供强大的 QR 码阅读器和条码阅读功能。在此,我们将讨论从图像文件中读取条码并输出条码格式和文本的最简单方法。

using System;
using Dynamsoft;
using Dynamsoft.DBR;

namespace HelloWorld
{
    class Program
    {
        static void Main(string [] args)
        {
            try
            {
                // 1.Initialize license.
                EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg);
                if (errorCode != EnumErrorCode.DBR_SUCCESS)
                {
                    Console.WriteLine(errorMsg);
                }

                // 2. Create an instance of Barcode Reader
                BarcodeReader dbr = new BarcodeReader();

                try
                {
                    TextResult [] results = null;

                    // 3. Read barcode from an image file
                    results = dbr.DecodeFile("../../../../images/AllSupportedBarcodeTypes.png", "");

                    if (results != null && results.Length > 0)
                    {
                        for (int i = 0; i < results.Length; ++i)
                        {
                            Console.WriteLine("Result " + (i + 1).ToString() + ":");

                            // 4. Get format of each barcode
                            if (results [i].BarcodeFormat != EnumBarcodeFormat.BF_NULL)
                                Console.WriteLine("    Barcode Format: " + results [i].BarcodeFormatString);
                            else
                                Console.WriteLine("    Barcode Format: " + results [i].BarcodeFormatString_2);

                            // 5. Get text result of each barcode
                            Console.WriteLine("    Barcode Text: " + results [i].BarcodeText);
                        }
                    }
                    else
                    {
                        Console.WriteLine("No barcode detected.");
                    }
                }
                catch (BarcodeReaderException exp)
                {
                    Console.WriteLine(exp.Message);
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine(exp.Message);
            }
            Console.WriteLine("Press any key to quit...");
            Console.ReadKey();
        }
    }
}
using System;
using Dynamsoft;
using Dynamsoft.DBR;

namespace HelloWorld
{
    class Program
    {
        static void Main(string [] args)
        {
            try
            {
                // 1.Initialize license.
                EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg);
                if (errorCode != EnumErrorCode.DBR_SUCCESS)
                {
                    Console.WriteLine(errorMsg);
                }

                // 2. Create an instance of Barcode Reader
                BarcodeReader dbr = new BarcodeReader();

                try
                {
                    TextResult [] results = null;

                    // 3. Read barcode from an image file
                    results = dbr.DecodeFile("../../../../images/AllSupportedBarcodeTypes.png", "");

                    if (results != null && results.Length > 0)
                    {
                        for (int i = 0; i < results.Length; ++i)
                        {
                            Console.WriteLine("Result " + (i + 1).ToString() + ":");

                            // 4. Get format of each barcode
                            if (results [i].BarcodeFormat != EnumBarcodeFormat.BF_NULL)
                                Console.WriteLine("    Barcode Format: " + results [i].BarcodeFormatString);
                            else
                                Console.WriteLine("    Barcode Format: " + results [i].BarcodeFormatString_2);

                            // 5. Get text result of each barcode
                            Console.WriteLine("    Barcode Text: " + results [i].BarcodeText);
                        }
                    }
                    else
                    {
                        Console.WriteLine("No barcode detected.");
                    }
                }
                catch (BarcodeReaderException exp)
                {
                    Console.WriteLine(exp.Message);
                }
            }
            catch (Exception exp)
            {
                Console.WriteLine(exp.Message);
            }
            Console.WriteLine("Press any key to quit...");
            Console.ReadKey();
        }
    }
}
Imports System
Imports Dynamsoft
Imports Dynamsoft.DBR

Namespace HelloWorld
	Friend Class Program
		Shared Sub Main(ByVal args() As String)
			Try
				' 1.Initialize license.
				Dim errorMsg As String
				Dim errorCode As EnumErrorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", errorMsg)
				If errorCode <> EnumErrorCode.DBR_SUCCESS Then
					Console.WriteLine(errorMsg)
				End If

				' 2. Create an instance of Barcode Reader
				Dim dbr As New BarcodeReader()

				Try
					Dim results() As TextResult = Nothing

					' 3. Read barcode from an image file
					results = dbr.DecodeFile("../../../../images/AllSupportedBarcodeTypes.png", "")

					If results IsNot Nothing AndAlso results.Length > 0 Then
						For i As Integer = 0 To results.Length - 1
							Console.WriteLine("Result " & (i + 1).ToString() & ":")

							' 4. Get format of each barcode
							If results (i).BarcodeFormat <> EnumBarcodeFormat.BF_NULL Then
								Console.WriteLine("    Barcode Format: " & results (i).BarcodeFormatString)
							Else
								Console.WriteLine("    Barcode Format: " & results (i).BarcodeFormatString_2)
							End If

							' 5. Get text result of each barcode
							Console.WriteLine("    Barcode Text: " & results (i).BarcodeText)
						Next i
					Else
						Console.WriteLine("No barcode detected.")
					End If
				Catch exp As BarcodeReaderException
					Console.WriteLine(exp.Message)
				End Try
			Catch exp As Exception
				Console.WriteLine(exp.Message)
			End Try
			Console.WriteLine("Press any key to quit...")
			Console.ReadKey()
		End Sub
	End Class
End Namespace
VB   C#

8.许可证发放

IronBarcode 是一个免费提供开发者许可证的库。IronBarcode 还具有独特的定价结构:简装版起价为 $749,没有任何隐藏费用。SaaS 和 OEM 产品也可再分发。所有许可证均有 30 天退款保证、一年的软件支持和升级、开发/分期/生产有效性以及永久许可证。 (一次性购买).IronBarcode 还提供免费版本。要查看 IronBarcode 的整个价格结构和许可证,请访问 这里.

Dynamsoft 条码阅读器提供基于 "每个条码读取 "和 "每个活动浏览器客户端 "的灵活许可选项。Dynamsoft 条码阅读器的定价如下:

每扫描一个条形码

  • 计算 SDK 一年内成功扫描的条形码总数,并收取相应费用。
  • 10,000 条条码扫描捆绑包的费用为 1,249 美元/年。
  • 50,000 条条码扫描捆绑包的费用为 $2,999/年。
  • 100,000 条码扫描捆绑包的费用为 4,999 美元/年。

每个活动浏览器客户端

  • 计算访问条形码扫描仪功能的唯一浏览器客户端总数,并收取相应费用。
  • 15 个浏览器客户端的捆绑费用为 1,249 美元/年。
  • 50 个浏览器客户端捆绑包的费用为 $2,999/年。
  • 100 个浏览器客户端捆绑包的费用为 4999 美元/年。

Dynamsoft 条码阅读器提供出色的许可和支持选项,鼓励开发人员选择 Dynamsoft 条码阅读器 SDK。

9.结论

IronBarcode 是一款领先的 .NET 条码库,可帮助程序员读取和创建条码。它支持广泛的一维和二维条形码,以及自定义的条形码。 (彩色和品牌) 二维码IronBarCode 允许开发人员使用所有与 .NET 相关的语言。IronBarcode 比其他任何 C# 条码阅读器和生成器都要快。它采用了一种独特的算法,可以轻松扫描皱巴巴的 QR 代码,条形码识别准确率极高。它还提供了一个功能强大的 QR 码阅读器,只需几行代码即可读取任何类型的条形码和 QR 码。IronBarcode 在从模糊图像中读取条形码方面表现出色,并可提供终身技术支持。

Dynamsoft Barcode Reader SDK 在同时扫描大量条形码方面也比竞争对手更胜一筹。它具有不同的使用场景,例如适用于 Android 移动应用程序、Linux 桌面、Linux 移动应用程序和 iPhone 移动应用程序的条形码读取功能,以及对多种浏览器的支持。它还能帮助扫描低质量图像的条形码。只需几行代码,它就能在您的网页、桌面或移动应用程序中提供嵌入式条形码读取功能。Dynamsoft 条形码阅读器可满足开发人员对自定义扫描仪分辨率设置的需求,提供及时、有用的响应,以及实现 1d 和 2d 解码条形码。只要许可证还在有效期内,Dynamsoft 条码阅读器支持团队就可以提供支持。它还可以使用嵌入式条形码读取功能对低质量图像进行高精度扫描。

与 Dynamsoft 的许可选项相比,IronBarcode 的定价结构相对较低,这可能是 Dynamsoft 条码阅读器成本较高的原因。Dynamsoft 的收费结构是基于计数的,这意味着它取决于在不同平台(如 Windows 桌面和 Mac 桌面)上扫描条形码的数量。另一方面,IronBarcode 提供一次性购买,没有持续性费用,而 Dynamsoft 条码阅读器的定价是基于每年的购买量。

在比较了 IronBarcode 和 Dynamsoft 条码阅读器之后,我们可以得出这样的结论:IronBarcode 不仅在条码读取方面,而且在条码生成功能方面都提供了更多的功能,而且价格更低。Dynamsoft 条码阅读器提供更多的读取功能,而 IronBarcode 则提供所有类型的条码相关服务。在.NET 编程方面,IronBarcode 只需几行代码就能提供所有功能,这是其竞争对手所无法提供的。除此以外,Iron Software 目前还以两款软件工具的价格提供全部五款软件工具。这些工具如下

  • IronBarcode
  • IronXL
  • IronOCR
  • IronPDF

  • IronWebScraper

请访问此链接探索 Iron Suite.

< 前一页
IronBarcode与OnBarcode比较

准备开始了吗? 版本: 2024.8 刚刚发布

免费NuGet下载 总下载量: 1,167,541 查看许可证 >