Porównanie IronBarcode i Dynamsoft Barcode Reader
Czym dokładnie jest BARCODE? BarCode to kwadratowy lub prostokątny obrazek złożony z sekwencji równoległych czarnych linii i białych przestrzeni o różnej długości, który może być odczytany przez skaner. Produkty są oznaczone BARCODAMI, aby ułatwić ich rozpoznanie. Wykorzystuje się je w różnych miejscach, w tym w handlu detalicznym w celu ułatwienia procesu zakupowego, w magazynach do zarządzania zapasami oraz na rachunkach w celu ułatwienia księgowości.
Czy można używać platformy .NET do odczytu i generowania kodów kreskowych BARCODE? Tak, można używać .NET Framework do tworzenia i skanowania kodów kreskowych. W tym artykułe przyjrzymy się, w jaki sposób programista może generować i skanować BarCodes w środowisku języka .NET. Omówimy i porównamy dwa programy, których programiści używają do pracy z kodami kreskowymi. Oto narzędzia, które będą Ci potrzebne:
- IronBarcode
- Dynamsoft BarCode Reader SDK
2. IronBarcode
Biblioteka IronBarcode for .NET służąca do odczytu i tworzenia kodów kreskowych. IronBarcode, popularna biblioteka kodów kreskowych .NET, umożliwia tworzenie szerokiej gamy kodów kreskowych 1- i 2-wymiarowych, a także konfigurowalnych (kolorowych i opatrzonych logo) kodów QR. IronBarcode pozwala programistom korzystać z dowolnego języka .NET.
IronBarcode jest kompatybilny z .NET Core 2x i 3x, .NET Standard, .NET Framework 4x oraz Azure. Generuje dane wyjściowe w formacie PostScript i konwertuje ciągi tekstowe przy użyciu szeregu standardowych kodów.
2.1. Funkcje IronBarcode
2.1.1. Formaty BarCode
- Formaty dwuwymiarowych kodów kreskowych typu macierzowego obejmują odczyt i tworzenie kodów QR, Aztec oraz Data Matrix w środowisku .NET.
- Nowoczesne formaty BarCode obsługujące tekst, liczby i dane binarne, w tym generator BarCode PDF417, Code 39 i Code 128 dla języka C#.
- Starsze formaty BarCode obsługujące wyłącznie kody numeryczne, w tym UPC-A, UPC-E, EAN-8, EAN-13, Codabar, ITF, MSI i Plessey.
2.1.2. Funkcje odczytu BarCodes
IronBarCode.BarcodeReaderStatic Class API reduces barcode and QR code reading to a single line of code.- Obsługuje odczyt BARCODE-ów z plików w formatach graficznych Jpeg, Jpeg2000, Png, BMP, wielostronicowych Tiff i Gif.
- Większa dokładność i wydajność. Aby poprawić dokładność i wydajność, należy poinformować czytelnika, aby skanował jeden, kilka lub wszystkie formaty BARCODE.
- Korekcja obrazu w celu odczytu kodów BARCODE. Aby zinterpretować wadliwe skany i obrazy, należy zastosować korektę szumu i kontrastu w dokumencie.
2.1.3. Funkcje tworzenia BarCodes
- The
BarcodeWriterandQRCodeWriterstatic classes are used to create a fault-tolerant barcode and QR-writing API. Dane z BarCode można zazwyczaj wyodrębnić za pomocą dwóch wierszy kodu. - IronBarcode umożliwia użytkownikom eksportowanie jako obrazy, eksportowanie do stron HTML oraz eksportowanie do plików PDF lub dodawanie do istniejących plików PDF.
- The class
QRCodeWriterprovides advanced support for rendering QR codes with advanced features.
3. Dynamsoft BarCode Reader SDK
Programiści używają czytnika BarCode Dynamsoft do szybkiej integracji skanowania kodów kreskowych 1D i 2D z programami działającymi na różnych platformach. Może być również wykorzystywany jako wydajny czytnik kodów QR lub skaner obrazów 2D, oprócz skanowania liniowych BARCODE-ów.
Pakiet SDK do skanowania kodów kreskowych firmy Dynamsoft jest najlepszy w branży. Może z łatwością poradzić sobie z różnymi sytuacjami, w tym:
- Skanowanie transmisji wideo na telefonach komórkowych.
- Skanowanie statycznych obrazów z kamer przemysłowych o wysokiej rozdzielczości.
- Automatyczna usługa desktopowa, która skanuje duże zdjęcia i pliki PDF.
3.1. Funkcje czytnika BarCode Dynasoft
3.1.1. Funkcja odczytu BarCode
- Przetwarzanie BarCode w wielu wątkach
- Multiple barcodes can be read in a single picture.
- Barcodes are detected at any orientation and rotation angle.
- Decodes barcodes from fuzzy, out-of-focus photos.
- With preprocessing, reads barcodes from low-quality photos.
3.1.2. Customization and Flexibility
With its default scanning settings, this SDK works well in many typical circumstances, but to get the best performance for your unique business requirements, this SDK is entirely adjustable so as to be able to optimize performance specifically for you. Select from a vast list of parameters, each of which contains a variety of modes. A mode is a particular function that the barcode reader may perform, and each mode can include a number of parameters that can be used to fine-tune or personalize the application further.
3.1.3. Using Image Processing
The Dynamsoft Barcode Reader SDK contains a functionality that isn't seen in any other barcode SDK. Developers may use it to get several data points from the decoding process. These "intermediate picture results" contain data that advanced users may utilize to increase efficiency or generate new applications in other workflows. In the process of decoding a barcode, numerous distinct sorts of intermediate picture outputs are generated.
3.1.4. Barcode Decoding from Images and PDFs
- Image file types include BMP, jpg, png, gif, and Tiff.
- Single-page and multi-page PDFs.
- DIB (device-independent bitmap) formats derived from cameras or scanners.
- A base64 string encoding of an image.
- A raw buffer for an image file stream.
3.1.5. Supported Barcode Types
The Dynamsoft barcode reader SDK is a reliable barcode scanner software that provides a barcode reading functionality for various types of barcodes.
- Linear Barcodes (1D)
- 2D Barcodes
- GS1 Composite Code
- Patch Code
- Pharmacode
- GS1 DataBar
- Postal Codes
4. Creating a New Project in Visual Studio
Open the Visual Studio software and go to the File menu. Select "new project" and then select console application.
Enter the project name and select the path in the appropriate text box. Then, click the Create button. Select the required .NET framework, as in the screenshot below:
The Visual Studio project will now generate the structure for the selected application, and if you have selected the console, Windows, and web application, it will open the program.cs file where you can enter the code and build/run the application.
Now we can add the library and test the program.
5. Install the IronBarcode Library
The IronBarcode library can be downloaded and installed in four different ways. Są to:
- Using the Visual Studio NuGet Package Manager
- Using the Visual Studio Command-Line.
- Direct Download from the NuGet Webpage.
- Direct Download from the IronBarcode Webpage.
5.1 Using the Visual Studio NuGet Package Manager
The Visual Studio software provides the NuGet Package Manager option to install the package directly to the solution. Poniższy zrzut ekranu pokazuje, jak otworzyć menedżera pakietów NuGet.
It provides the search box to show the list of available package libraries from the NuGet site. In the package manager, we need to search for the keyword "IronBarCode", as in the below screenshot:
From the above image, we can see the list of the related packages in the search list. We need to select the IronBarcode option and install the package in our solution.
5.2 Using the Visual Studio Command-Line
In the Visual Studio menu, Go to Tools-> NuGet Package manager -> Package manager console.
Enter the following line in the package manager console tab:
Install-Package BarCode
Teraz pakiet zostanie pobrany/zainstalowany w bieżącym projekcie i będzie gotowy do użycia.
5.3 Direct Download from the NuGet Website
Trzecim sposobem jest pobranie pakietu bezpośrednio ze strony internetowej.
- Navigate to the IronOCR NuGet Package Page.
- Select the download package option from the right-hand side menu.
- Kliknij dwukrotnie pobrany pakiet. Zostanie zainstalowany automatycznie.
- Now reload the solution and start using it in the project.
5.4 Direct Download from the IronBarcode Website
Download the latest IronBarcode package from IronBarcode's website. After the download, follow the steps below to add the package to the project.
- Kliknij prawym przyciskiem myszy projekt w oknie rozwiązania.
- Then, select the option reference and browse the location of the downloaded reference.
- Then, click OK to add the reference.
6. Install the Dynamsoft Barcode Reader
The Dynamsoft Barcode Reader SDK can be downloaded and installed in four different ways. Są to:
- Using the Visual Studio NuGet Package Manager
- Using the Visual Studio Command-Line.
- Direct Download from the NuGet Webpage.
- Direct Download from the Dynamsoft Webpage.
6.1 Using the Visual Studio NuGet Package Manager
The Dynamsoft barcode reader enables developers to easily integrate its tool with .NET projects using the Visual Studio NuGet Package Manager. Postępuj zgodnie z poniższymi instrukcjami:
It provides a search box to show the list of available package libraries from the NuGet site. In the package manager, we need to search for the keyword "Dynamsoft", as in the below screenshot:
In the above image we can see the list of the related packages from the search. We need to select the Dynamsoft option and install the package to our solution.
6.2 Using the Visual Studio Command-Line
In the Visual Studio menu, go to Tools-> NuGet Package manager -> Package manager console
Enter the following line in the package manager console tab:
Install-Package Dynamsoft.DotNet.Barcode
The package will now download/install to the current project and be ready to use.
6.3 Direct Download from the NuGet Website
The third way is to download the NuGet package directly from the webpage.
- Navigate to the link: https://www.nuget.org/packages/Dynamsoft.DotNet.Barcode/
- Wybierz opcję pakietu do pobrania z menu po prawej stronie.
- Double-click the downloaded package; it will be installed automatically.
- Now reload the solution and begin using it in the project.
6.4 Direct Download from the Dynamsoft Website
Download the latest package directly from the webpage. After the download, follow the steps below to add the package to the project.
- Kliknij prawym przyciskiem myszy projekt w oknie rozwiązania.
- Then, select option reference and browse the location of the downloaded reference.
- Następnie kliknij OK, aby dodać odwołanie.
7. Reading Barcode
Reading barcodes to get the information embedded within is useful. In this section, we will discuss how these tools read different barcodes.
7.1. Reading Barcode using IronBarcode
The Barcode Reader is a script that reads barcodes. The IronBarCode namespace's QuicklyReadOneBarcode function is a fantastic tool for reading barcodes in the .NET framework. We can considerably enhance speed by choosing a barcode encoding scheme, and we can force it to automatically adjust for perspective and digital noise by setting the TryHarder option to True.
The QuicklyReadAllBarcodes method is similar, but it can scan multiple barcodes for multipage documents like PDFs and multipage 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
7.2. Reading Barcode using Dynamsoft Barcode
The Dynamsoft Barcode Reader offers a powerful QR code and barcode reading functionality with simple code. Here we will discuss the simplest way to read barcodes from an image file and output barcode format and text.
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
8. Licensing
IronBarcode is a library that provides a developer's license for free. IronBarcode also has a distinct pricing structure: the Lite bundle starts at $liteLicense with no hidden fees. The redistribution of SaaS and OEM products is also possible. All licenses have a 30-day money-back guarantee, a year of software support and upgrades, dev/staging/production validity, and a perpetual license (one-time purchase). IronBarcode also offers a free version. View IronBarcode's entire price structure and licensing options.
The Dynamsoft barcode reader offers annual licensing with a flat fee structure. Dynamsoft's licensing is based on annual subscriptions rather than per-scan or per-client usage counts. Pricing starts from approximately $1,249-$1,371 per year depending on the license type and version, as verified through authorized distributors such as ComponentSource and official vendor pricing.
The Dynamsoft barcode reader provides excellent licensing and support options to encourage developers to choose the Dynamsoft barcode reader SDK.
9. Podsumowanie
IronBarcode is a leading .NET barcode library that enables programmers to read and create barcodes. It supports a broad range of 1 and 2 dimensional barcodes, as well as customized (colored and branded) QR codes. IronBarCode allows developers to use all .NET related languages. IronBarcode offers high-performance barcode reading and generation capabilities optimized for .NET environments. It employs a unique algorithm that can easily scan crumpled QR codes with exceptional barcode recognition accuracy. It also offers a powerful QR code reader that is able to read any type of barcode and QR code with just a few lines of code. IronBarcode is excellent at reading barcodes from blurred images, and technical support is available to provide lifetime assistance.
The Dynamsoft Barcode Reader SDK also has a leg up on the competition when it comes to scanning numerous barcodes at once. It has different usage scenarios such as the barcode reading functionality for android mobile applications, Linux desktop, Linux mobile applications and iPhone mobile applications, as well as support for multiple browsers. Its also helps to scan low quality images for barcodes. Zapewnia wbudowaną funkcję odczytu kodów BarCode w aplikacjach internetowych, stacjonarnych lub mobilnych przy użyciu zaledwie kilku wierszy kodu. Czytnik kodów kreskowych Dynamsoft spełnia potrzeby programistów w zakresie niestandardowych ustawień rozdzielczości skanera, zapewniając szybkie i pomocne odpowiedzi, a także obsługując dekodowanie kodów kreskowych 1D i 2D. Zespoły wsparcia technicznego czytników BarCode Dynamsoft są dostępne tak długo, jak długo licencje pozostają ważne. Oferuje również skanowanie obrazów o niskiej jakości z dużą dokładnością dzięki wbudowanej funkcji odczytu BarCODE.
Struktura cenowa IronBarcode jest stosunkowo niska w porównaniu z opcjami licencyjnymi Dynamsoft i prawdopodobnie to właśnie koszt czytnika BarCode sprawia, że jest on mniej atrakcyjny dla użytkowników. Struktura opłat Dynamsoft opiera się na rocznych subskrypcjach z opłatami ryczałtowymi zależnymi od typu licencji. Z drugiej strony IronBarcode oferuje jednorazowy zakup bez bieżących kosztów, podczas gdy ceny czytnika kodów kreskowych Dynamsoft opierają się na rocznych subskrypcjach.
Po porównaniu zarówno IronBarcode, jak i czytnika kodów kreskowych Dynamsoft, możemy stwierdzić, że IronBarcode oferuje dodatkowe funkcje, nie tylko w zakresie odczytu kodów kreskowych, ale także w zakresie generowania kodów kreskowych, i to po niższej cenie. Czytnik kodów kreskowych Dynamsoft oferuje więcej w zakresie odczytu, podczas gdy IronBarcode oferuje wszystkie rodzaje usług związanych z kodami kreskowymi. W przypadku programowania w .NET, IronBarcode oferuje wszystkie funkcje przy użyciu zaledwie kilku linii kodu, czego nie zapewnia konkurencja. Ponadto firma Iron Software oferuje obecnie wszystkie pięć narzędzi programistycznych w cenie dwóch. Następujące narzędzia:
Kliknij ten link, aby zapoznać się z pakietem Iron Suite.
Często Zadawane Pytania
Jak mogę tworzyć i odczytywać kody kreskowe w aplikacji napisanej w języku C#?
W aplikacji napisanej w języku C# można używać biblioteki IronBarcode do tworzenia i odczytywania różnych typów kodów kreskowych, w tym kodów 1D i 2D. Biblioteka umożliwia łatwą integrację z platformami .NET i oferuje metody eksportowania oraz importowania danych kodów kreskowych.
Co sprawia, że IronBarcode for .NET jest lepszym wyborem dla programistów .NET w porównaniu z Dynamsoft?
IronBarcode oferuje szerszy zakres funkcji, takich jak generowanie i odczytywanie kodów kreskowych, po niższych kosztach dzięki opcji jednorazowego zakupu. Obsługuje również wiele platform .NET, co czyni go wszechstronnym narzędziem dla programistów.
W jaki sposób IronBarcode obsługuje generowanie i odczytywanie BarCodes?
IronBarcode pozwala programistom tworzyć i odczytywać kody kreskowe za pomocą prostych metod GenerateBarcode i ReadBarcode. Obsługuje różne formaty obrazów i oferuje opcje dostosowywania wyglądu kodów kreskowych.
Czy istnieją opłacalne alternatywy dla programu Dynamsoft BarCode Reader dla programistów C#?
Tak, IronBarcode to opłacalna alternatywa, która zapewnia programistom C# rozbudowane funkcje obsługi kodów kreskowych po niższych kosztach w porównaniu z modelem cenowym firmy Dynamsoft opartym na wykorzystaniu.
Jakie metody instalacji są dostępne dla IronBarcode?
IronBarcode można zainstalować za pomocą menedżera pakietów NuGet w Visual Studio, wiersza poleceń Visual Studio lub pobierając go bezpośrednio ze strony internetowej IronBarcode.
Jakie platformy obsługuje IronBarcode?
IronBarcode obsługuje wiele platform .NET, w tym .NET Core, .NET Framework i Azure, dzięki czemu można go dostosować do różnych środowisk programistycznych C#.
Czy IronBarcode radzi sobie ze skanowaniem obrazów o niskiej jakości?
Tak, IronBarcode został zaprojektowany do odczytu kodów kreskowych z obrazów o różnej jakości, w tym obrazów o niskiej jakości, zapewniając niezawodną wydajność w różnych warunkach.
Jakie są zalety korzystania z IronBarcode do skanowania kodów kreskowych?
IronBarcode zapewnia wysoką dokładność i wydajność skanowania kodów kreskowych, obsługuje szeroki zakres formatów kodów kreskowych oraz umożliwia łatwą integrację z projektami .NET za pomocą prostych fragmentów kodu.

