与其他组件比较 A Comparison between IronBarcode and Dynamsoft Barcode Reader Jordi Bardia 已更新:七月 28, 2025 Download IronBarcode NuGet 下载 DLL 下载 Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article 条形码究竟是什么? 条形码是一种由一系列平行的黑色线条和不同长度的白色空间组成的方形或矩形图像,可通过扫描仪读取。 产品贴有条形码以便更容易识别。它们用于多种场合,包括零售商店以帮助购买过程,在仓库中管理库存,以及用于账单以辅助会计。 可以使用.NET平台来读取和生成条形码吗? 是的,您可以使用.NET框架来创建和扫描条形码。 在本文中,我们将探讨开发者如何在.NET语言环境中生成和扫描条形码。 我们将讨论并比较开发人员用于处理条形码的两个软件程序。 以下是您需要的工具: IronBarcode Dynamsoft Barcode Reader SDK 2. IronBarcode IronBarcode 是一个用于读取和创建条形码的.NET库。 IronBarcode 是一个流行的.NET条形码库,可以创建多种一维和二维条形码,以及可定制(着色和品牌)的QR码。 IronBarcode 允许程序员使用任何.NET语言。 IronBarcode 与.NET Core 2x 和 3x、.NET Standard、.NET Framework 4x 和 Azure 兼容。 它生成后脚本输出并使用多种标准代码转换文本字符串。 2.1. IronBarcode 特性 2.1.1. 条形码格式 二维矩阵条形码格式包括QR码、Aztec和Data Matrix .NET的读取和创建。 现代线性条形码格式支持文本、数字和二进制数据,包括PDF417、Code 39、Code 128 条形码生成器用于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 静态类创建容错条形码的写入API。 通常只需两行代码就可以提取条形码数据。 IronBarcode 允许用户导出为图像,导出到HTML页面,导出到PDF或添加到现有的PDF中。 类QRCodeWriter 提供高级支持用于呈现具有高级功能的QR码。 3. The Dynamsoft Barcode Reader SDK 开发人员使用Dynamsoft条形码阅读器迅速地将一维和二维条形码扫描集成到其在各种平台上运行的程序中。 除了扫描线性条形码之外,它还可用作强大的QR码阅读器或二维成像器。 来自Dynamsoft的条形码扫描SDK在业内最佳。 它能够应对各种情况,包括: 在手机上扫描视频广播。 从高分辨率工业相机中扫描静态图片。 自动桌面服务扫描大型照片和PDF文件。 3.1. Dynasoft Barcode Reader 特性 3.1.1. 条形码读取功能 多线程处理条形码 单个图像中可以读取多个条形码。 条形码在任意方向和旋转角度被检测。 从模糊、焦点不清晰的照片中解码条形码。 通过预处理从低质量照片中读取条形码。 3.1.2. 定制化和灵活性 凭借其默认扫描设置,这个SDK在许多典型情况下效果良好,但为了获得适合您独特业务需要的最佳性能,该SDK是完全可调整的,以便能为您特别优化性能。 从广泛的参数列表中选择,每个参数包含多种模式。 模式是条形码阅读器可能执行的特定功能,每种模式可以包括许多可以进一步调整或个性化应用程序的参数。 3.1.3. 使用图像处理 Dynamsoft Barcode Reader SDK 包含其他条形码SDK中未见到的一项功能。 开发人员可以使用它从解码过程中获得多个数据点。 这些“中间图片结果”包含的数据可供高级用户用来提高效率或在其他工作流程中生成新的应用程序。 在解码条形码的过程中,会生成多种不同类型的中间图片输出。 3.1.4. 从图像和PDF中解码条形码 图像文件类型包括BMP、jpg、png、gif和Tiff。 单页和多页PDF。 从相机或扫描仪获取的DIB(设备无关位图)格式。 图像的base64字符串编码。 图像文件流的原始缓冲区。 3.1.5. 支持的条形码类型 Dynamsoft 条形码阅读器SDK 是一个可靠的条形码扫描软件,提供各种条形码类型的条形码读取功能。 线性条形码(1D) 二维条形码 GS1 复合编码 补码 制药码 GS1 DataBar 邮政编码 4. 在 Visual Studio 中创建一个新项目 打开 Visual Studio 软件并转到文件菜单。 选择"新项目",然后选择控制台应用程序。 在适当的文本框中输入项目名称并选择路径。 然后,点击创建按钮。 根据下面的截图选择所需的 .NET 框架: class="content-img-align-center"> class="center-image-wrapper"> Visual Studio 项目现在将为所选应用程序生成结构,如果您选择了控制台、Windows 和 Web 应用程序,它将打开 program.cs 文件,您可以在其中输入代码并构建/运行应用程序。 class="content-img-align-center"> class="center-image-wrapper"> 现在我们可以添加库并测试程序。 5. 安装 IronBarcode 库 可以通过四种不同的方法下载和安装 IronBarcode 库。 这些是: 使用 Visual Studio NuGet 包管理器 使用Visual Studio命令行。 直接从 NuGet 网页下载。 直接从 IronBarcode 网页下载。 5.1 使用 Visual Studio NuGet 包管理器 Visual Studio软件提供NuGet包管理器选项直接将包安装到解决方案。 下面的截图显示了如何打开NuGet包管理器。 class="content-img-align-center"> class="center-image-wrapper"> 它提供了一个搜索框来显示来自 NuGet 网站的可用包库列表。在包管理器中,我们需要搜索关键字“IronBarCode”,如下图所示: class="content-img-align-center"> class="center-image-wrapper"> 从上面的图像中,我们可以看到搜索列表中的相关包列表。我们需要选择 IronBarcode 选项并在我们的解决方案中安装该包。 5.2 使用 Visual Studio 命令行 在 Visual Studio 菜单中,转到工具-> NuGet 包管理器 -> 包管理器控制台。 在包管理器控制台选项卡中输入以下行: Install-Package BarCode 现在包将下载/安装到当前项目,并可以使用了。 class="content-img-align-center"> class="center-image-wrapper"> class="content-img-align-center"> class="center-image-wrapper"> 5.3 直接从 NuGet 网站下载 第三种方法是直接从网站下载程序包。 前往 IronOCR NuGet 包页面。 从右侧菜单中选择下载包选项。 双击已下载的包。 它将自动安装。 现在重新加载解决方案并开始在项目中使用它。 5.4 直接从 IronBarcode 网站下载 从 IronBarcode 网站下载最新的 IronBarcode 包。下载完成后,按照以下步骤将包添加到项目中。 从解决方案窗口右键点击项目。 然后,选择参考选项并浏览下载的参考的存放位置。 然后,点击确定以添加引用。 6. 安装 Dynamsoft 条形码阅读器 可以通过四种不同的方法下载和安装 Dynamsoft 条形码阅读器SDK。 这些是: 使用 Visual Studio NuGet 包管理器 使用Visual Studio命令行。 直接从 NuGet 网页下载。 直接从 Dynamsoft 网页下载。 6.1 使用Visual Studio NuGet包管理器 Dynamsoft 条形码阅读器使开发人员能够使用 Visual Studio NuGet 包管理器轻松地将其工具与 .NET 项目集成。 请按照以下步骤操作: class="content-img-align-center"> class="center-image-wrapper"> 它提供了一个搜索框来显示来自 NuGet 网站的可用包库列表。在包管理器中,我们需要搜索关键字“Dynamsoft”,如下图所示: class="content-img-align-center"> class="center-image-wrapper"> 在上面的图像中,我们可以看到搜索中相关包的列表。 我们需要选择 Dynamsoft 选项并将包安装到我们的解决方案中。 6.2 使用Visual Studio命令行 在 Visual Studio 菜单中,转到工具-> NuGet 包管理器 -> 包管理器控制台 在包管理器控制台选项卡中输入以下行: Install-Package Dynamsoft.DotNet.Barcode 该软件包现在将下载/安装到当前项目并准备好使用。 class="content-img-align-center"> class="center-image-wrapper"> class="content-img-align-center"> class="center-image-wrapper"> 6.3 直接从 NuGet 网站下载 第三种方式是直接从网页上下载 NuGet 包。 前往链接:https://www.nuget.org/packages/Dynamsoft.DotNet.Barcode/ 从右侧菜单中选择下载包选项。 双击下载的包; 它将自动安装。 现在重新加载解决方案并开始在项目中使用它。 6.4 直接从 Dynamsoft 网站下载 直接从网页下载最新的包。 下载后,按照以下步骤将包添加到项目中。 从解决方案窗口右键点击项目。 然后,选择选项引用并浏览已下载引用的位置。 然后,单击确定以添加参考。 7. 读取条形码 读取条形码以获取其中嵌入的信息是有用的。 在本节中,我们将讨论这些工具如何读取不同的条形码。 7.1. 使用 IronBarcode 读取条形码 条形码读取器是读取条形码的脚本。 IronBarCode 命名空间中的QuicklyReadOneBarcode函数是一个出色的工具,用于在 .NET 框架中读取条形码。 通过选择条形码编码方案,我们可以显著提高速度,并且通过将TryHarder选项设置为True,我们可以强制自动调整视角和数字噪声。 QuicklyReadAllBarcodes方法类似,但它可以扫描多页文档(如 PDFs 和多页 TIFFs)上的多个条形码。 using IronBarCode; using System; using System.Drawing; class Program { static void Main(string[] args) { // Read a single barcode from an image file 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; // Output the barcode value to the console Console.WriteLine("Barcode Value: " + value); } else { // Output message when no barcode is found Console.WriteLine("No barcode detected."); } } } using IronBarCode; using System; using System.Drawing; class Program { static void Main(string[] args) { // Read a single barcode from an image file 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; // Output the barcode value to the console Console.WriteLine("Barcode Value: " + value); } else { // Output message when no barcode is found Console.WriteLine("No barcode detected."); } } } Imports IronBarCode Imports System Imports System.Drawing Friend Class Program Shared Sub Main(ByVal args() As String) ' Read a single barcode from an image file Dim 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 ' Output the barcode value to the console Console.WriteLine("Barcode Value: " & value) Else ' Output message when no barcode is found Console.WriteLine("No barcode detected.") End If End Sub End Class $vbLabelText $csharpLabel 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. Replace the license key below with your own. EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg); if (errorCode != EnumErrorCode.DBR_SUCCESS) { Console.WriteLine("License Error: " + errorMsg); return; } // 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("Barcode Reader Error: " + exp.Message); } } catch (Exception exp) { Console.WriteLine("Error: " + exp.Message); } finally { 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. Replace the license key below with your own. EnumErrorCode errorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", out string errorMsg); if (errorCode != EnumErrorCode.DBR_SUCCESS) { Console.WriteLine("License Error: " + errorMsg); return; } // 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("Barcode Reader Error: " + exp.Message); } } catch (Exception exp) { Console.WriteLine("Error: " + exp.Message); } finally { 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. Replace the license key below with your own. Dim errorMsg As String Dim errorCode As EnumErrorCode = BarcodeReader.InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", errorMsg) If errorCode <> EnumErrorCode.DBR_SUCCESS Then Console.WriteLine("License Error: " & errorMsg) Return 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("Barcode Reader Error: " & exp.Message) End Try Catch exp As Exception Console.WriteLine("Error: " & exp.Message) Finally Console.WriteLine("Press any key to quit...") Console.ReadKey() End Try End Sub End Class End Namespace $vbLabelText $csharpLabel 8. 许可证 IronBarcode是一个提供开发者免费许可证的库。 IronBarcode还有一个不同的定价结构:Lite包从$liteLicense 开始,没有隐藏费用。 SaaS 和 OEM 产品的再分发也是可能的。 所有许可证都有30天退款保证、一年的软件支持和升级、开发/测试/生产有效性和永久许可证(一次性购买)。 IronBarcode还提供免费版本。 查看 IronBarcode 的完整价格结构和许可选项。 Dynamsoft 条形码阅读器提供年度许可证,具有固定费用结构。 Dynamsoft 的许可证基于年度订阅,而不是每次扫描或每个客户的使用量。 定价从大约$1,249-$1,371每年开始,具体取决于许可证类型和版本,已通过授权经销商如 ComponentSource 和官方供应商定价验证。 Dynamsoft 条形码阅读器提供优秀的许可和支持选项,以鼓励开发人员选择Dynamsoft 条形码阅读器SDK。 9. 结论 IronBarcode是一个领先的.NET条形码库,使程序员可以读取和创建条形码。 它支持广泛的一维和二维条形码,以及定制(着色和品牌)的QR码。 IronBarCode 允许开发人员使用所有 .NET 相关语言。 IronBarcode 提供在.NET环境中优化的高性能条形码读取和生成能力。 它采用独特算法,轻松扫描皱巴巴的QR码,具备卓越的条形码识别精度。 它还提供了一个强大的QR码阅读器,只需几行代码就可以读取任何类型的条形码和QR码。 IronBarcode在从模糊图像中读取条形码方面表现出色,并提供可终生帮助的技术支持。 Dynamsoft 条形码阅读器SDK在一次扫描多个条形码方面也比竞争对手更有优势。 它有不同的使用场景,例如用于安卓手机应用的条形码读取功能、Linux桌面、Linux手机应用和iPhone手机应用,以及多种浏览器的支持。 它还帮助扫描低质量图像上的条形码。 它的嵌入式条形码阅读功能可在您的网络、桌面或移动应用中使用,只需几行代码。 Dynamsoft 条形码阅读器满足开发人员对定制扫描仪分辨率设置的需求,提供及时和有帮助的响应,以及实现1D和2D条形码的解码。 Dynamsoft 条形码阅读器支持团队在许可证有效期内随时待命。 它还以高精度扫描低质量图像,使用嵌入式条形码阅读功能。 与 Dynamsoft 许可证选项相比,IronBarcode 的定价结构相对较低,可能是 Dynamsoft 条形码阅读器高昂的费用使用户望而却步。 Dynamsoft 的费用结构基于年度订阅,固定费用取决于许可证类型。 另一方面,IronBarcode 提供一次性购买,没有持续成本,而 Dynamsoft 条形码阅读器的定价基于年度订 订。 在比较了 IronBarcode 和 Dynamsoft 条形码阅读器之后,我们可以得出结论,IronBarcode 不仅在条形码读取功能上提供了额外的功能,而且在条形码生成方面也提供了功能,并且价格较低。Dynamsoft 条形码阅读器在读取方面提供更多,而 IronBarcode 提供各种条形码相关服务。 对于.NET编程,IronBarcode 只需几行代码就能提供所有功能,而竞争对手却未能实现这一点。除此之外,Iron Software 目前正在以仅两款工具的价格提供其五种软件工具。 工具包括: IronBarcode IronXL IronOCR IronPDF IronWebScraper 请访问此链接了解Iron Suite。 [{i:(Dynamsoft Barcode Reader SDK 是其各自所有者的注册商标。 本网站与 Dynamsoft Barcode Reader SDK 无关、未被其批准或赞助。 所有产品名称、徽标和品牌均为其各自所有者的财产。 比较仅供参考,反映的是撰写时的公开信息。] 常见问题解答 如何在 C# 应用程序中创建和读取条码? 您可以在 C# 应用程序中使用 IronBarcode 来创建和读取各种类型的条码,包括 1D 和 2D 条码。该库支持与 .NET 平台的轻松集成,并提供了导出和导入条码数据的方法。 与 Dynamsoft 相比,IronBarcode 对于 .NET 开发人员有哪些更好的选择? IronBarcode 提供更广泛的功能,例如以更低成本生成和读取条码,并提供一次性购买选项。它还支持多个 .NET 平台,使其对开发人员更具通用性。 IronBarcode 如何处理条码生成和读取? IronBarcode 允许开发人员使用简单的 GenerateBarcode 和 ReadBarcode 方法创建和读取条码。它支持不同的图像格式,并提供条码设计的自定义选项。 对于 C# 开发人员,是否有成本效益的 Dynamsoft 条码阅读器替代方案? 是的,IronBarcode 是一种具有成本效益的替代方案,与 Dynamsoft 的基于使用的定价模型相比,它以更低的成本为 C# 开发人员提供广泛的条码处理功能。 IronBarcode 有哪些安装方法? IronBarcode 可以通过 Visual Studio NuGet 包管理器、Visual Studio 命令行安装,或直接从 IronBarcode 网站下载。 IronBarcode 支持哪些平台? IronBarcode 支持多个 .NET 平台,包括 .NET Core、.NET Framework 和 Azure,使其能够适应各种 C# 开发环境。 IronBarcode 能否处理低质量的图像扫描? 是的,IronBarcode 旨在读取各种图像质量的条码,包括低质量图像,确保在不同条件下具有强大的性能。 使用 IronBarcode 进行条码扫描有什么好处? IronBarcode 在条码扫描方面提供高精度和高性能,支持多种条码格式,并通过简单的代码片段提供与 .NET 项目的轻松集成。 Jordi Bardia 立即与工程团队聊天 软件工程师 Jordi 最擅长 Python、C# 和 C++,当他不在 Iron Software 利用这些技能时,他就在游戏编程。分享产品测试、产品开发和研究的责任,Jordi 在持续的产品改进中增加了巨大的价值。多样的经验使他面临挑战并保持投入,他表示这是在 Iron Software 工作的最喜欢的方面之一。Jordi 在佛罗里达州迈阿密长大,并在佛罗里达大学学习计算机科学和统计学。 相关文章 已更新九月 25, 2025 How to Choose the Best Barcode Library in C# 在本指南中,我们将比较五个最广泛使用的 .NET 条形码库——IronBarcode、http://ZXing.Net、Aspose.BarCode、BarcodeLib 和 Dynamsoft Barcode Reader。 阅读更多 已更新七月 28, 2025 How to Scan Barcodes in ZXing For C# Developers The core image decoding library, JavaSE-specific client code, and the Android client Barcode Scanner are only a few of the modules that make up ZXing. Numerous more independent open-source projects are built upon it. 阅读更多 已更新八月 31, 2025 ZXing.org QR Code Library and IronBarcode: A Comprehensive Comparison ZXing是一个流行的开源库,用于生成和解码一维和二维条形码。 阅读更多 A Comparison between IronBarcode and OnBarcode
已更新九月 25, 2025 How to Choose the Best Barcode Library in C# 在本指南中,我们将比较五个最广泛使用的 .NET 条形码库——IronBarcode、http://ZXing.Net、Aspose.BarCode、BarcodeLib 和 Dynamsoft Barcode Reader。 阅读更多
已更新七月 28, 2025 How to Scan Barcodes in ZXing For C# Developers The core image decoding library, JavaSE-specific client code, and the Android client Barcode Scanner are only a few of the modules that make up ZXing. Numerous more independent open-source projects are built upon it. 阅读更多
已更新八月 31, 2025 ZXing.org QR Code Library and IronBarcode: A Comprehensive Comparison ZXing是一个流行的开源库,用于生成和解码一维和二维条形码。 阅读更多