Test in a live environment
Test in production without watermarks.
Works wherever you need it to.
If you already have an electronic image of the barcode in tech phone/admin phone and want to decipher it as English text data, a barcode scanner might not be the best tool. Additionally, barcode scanners are limited to reading only 1-D barcodes which have restricted storage capacity, domain status, supported formats and can only be used with the Windows RT Class library. Nowadays, 2-D barcodes (also called QR codes) are more common and can store significantly more information like updated date.
A barcode scanning application can run on Windows, MacOS, or Linux without relying on any third-party tools or APIs since it is supported by .NET.
Creating and scanning barcodes has become essential for many businesses to avoid spam. Two popular tools for creating barcodes are the open source ZXing project decode and IronBarcode. In this article, we'll explore the features and benefits of each of these tools and compare them.
ZXing is a popular open-source library for generating and decoding 1D and 2D barcodes.
It also supports multiple programming languages, including Java, C++, and .NET.
The ZXing Decoder Online is a web-based tool that enables users to scan and decode barcode and QR code images. Additionally, users can create QR codes for any information, which is usually in the form of a URL or text that they want to encode.
To use the ZXing online decoder, follow these steps:
Visit the ZXing Decoder Online website.
Once you have selected the image, click the "Submit" button.
The library is easy to use and can be integrated into Web applications, mobile apps, and desktop applications.
ZXing has been widely adopted and has a large community of developers contributing to its development and providing support.
The library collects device information such as the device model and OS version, which can be considered a potential security risk.
Additionally, some have raised concerns over the ownership and control of the library, as it is not maintained by an independent organization.
Overall, ZXing is a powerful and versatile library for barcode generation and decoding, with widespread adoption and community support.
To generate a QR code using ZXing, for example, developers only need to write a few lines of code:
using ZXing;
using ZXing.QrCode;
// Generate a QR code
BarcodeWriter writer = new BarcodeWriter();
writer.Format = BarcodeFormat.QR_CODE;
Bitmap qrCode = writer.Write("Hello, ZXing!");
using ZXing;
using ZXing.QrCode;
// Generate a QR code
BarcodeWriter writer = new BarcodeWriter();
writer.Format = BarcodeFormat.QR_CODE;
Bitmap qrCode = writer.Write("Hello, ZXing!");
Imports ZXing
Imports ZXing.QrCode
' Generate a QR code
Private writer As New BarcodeWriter()
writer.Format = BarcodeFormat.QR_CODE
Dim qrCode As Bitmap = writer.Write("Hello, ZXing!")
To decode a QR code using ZXing project, developers can use the following code:
using ZXing;
using ZXing.QrCode;
// Decode a QR code
BarcodeReader reader = new BarcodeReader();
Result result = reader.Decode(qrCode);
string text = result.Text;
using ZXing;
using ZXing.QrCode;
// Decode a QR code
BarcodeReader reader = new BarcodeReader();
Result result = reader.Decode(qrCode);
string text = result.Text;
Imports ZXing
Imports ZXing.QrCode
' Decode a QR code
Private reader As New BarcodeReader()
Private result As Result = reader.Decode(qrCode)
Private text As String = result.Text
IronBarcode is a powerful barcode generation and scanning library for .NET developers, created by Iron Software.
IronBarcode provides an easy-to-use API that allows developers to generate and scan various barcode types, including QR codes, Data Matrix codes, and UPC-A barcodes.
The IronBarcode library was created by Iron Software as a way to extend the functionality of the ZXing.NET library.
They also added new features and functionality, such as the ability to generate 2D barcode, PDF417 barcodes and the ability to read barcodes directly from image files.
Here's an example of how to generate a QR code using IronBarcode:
using IronBarCode;
// Generate a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.SaveAsImage("qrcode.png");
using IronBarCode;
// Generate a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.SaveAsImage("qrcode.png");
Imports IronBarCode
' Generate a QR code
Private barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode)
barcode.SaveAsImage("qrcode.png")
To scan a barcode using IronBarcode, you can use the following code:
using IronBarCode;
// Scan a barcode
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
string text = barcode.Text;
using IronBarCode;
// Scan a barcode
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
string text = barcode.Text;
Imports IronBarCode
' Scan a barcode
Private barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode)
Private text As String = barcode.Text
IronBarcode supports a wide range of barcode types, including 2D Barcode, UPC-A, UPC-E, EAN-8, EAN-13, Code39, Code128, PDF417, and many more.
It builds on the strengths of the ZXing.NET library, providing faster, more accurate barcode scanning and generation while also adding new features and functionality.
Here are some steps on how to use IronBarcode:
To use IronBarcode in your .NET project, you first need to install the IronBarcode library using NuGet. You can do this by running the following command in the NuGet Package Manager Console:
Install-Package IronBarCode
To generate a barcode using IronBarcode, you can use the BarcodeWriter class.
using IronBarCode;
// Generate a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.SaveAsImage("qrcode.png");
using IronBarCode;
// Generate a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.SaveAsImage("qrcode.png");
Imports IronBarCode
' Generate a QR code
Private barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode)
barcode.SaveAsImage("qrcode.png")
This code creates a QR code with the text "Hello, IronBarcode!" and saves it as an image file named "qrcode.png".
To scan a barcode using IronBarcode, you can use the BarcodeReader
class.
using IronBarCode;
// Scan a QR code
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
string text = barcode.Text;
using IronBarCode;
// Scan a QR code
var barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode);
string text = barcode.Text;
Imports IronBarCode
' Scan a QR code
Private barcode = BarcodeReader.ReadBarcode("qrcode.png", BarcodeEncoding.QRCode)
Private text As String = barcode.Text
This code reads the QR code from the image file "qrcode.png" and returns the text that was encoded in the barcode.
IronBarcode provides a range of customization options that allow you to control the appearance and behavior of the generated barcode scanning implementation.
Here's an example of how to customize a QR code using IronBarcode for barcode scanning implementation:
using IronBarCode;
// Customize a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.ResizeTo(400, 400);
barcode.SetMargins(20);
barcode.SetForegroundColor(Color.Black);
barcode.SetBackgroundColor(Color.White);
barcode.AddCaptionAbove("Scan me with your smartphone!");
barcode.AddImageLogo("logo.png", 80, 80);
barcode.SaveAsImage("qrcode.png");
using IronBarCode;
// Customize a QR code
var barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode);
barcode.ResizeTo(400, 400);
barcode.SetMargins(20);
barcode.SetForegroundColor(Color.Black);
barcode.SetBackgroundColor(Color.White);
barcode.AddCaptionAbove("Scan me with your smartphone!");
barcode.AddImageLogo("logo.png", 80, 80);
barcode.SaveAsImage("qrcode.png");
Imports IronBarCode
' Customize a QR code
Private barcode = BarcodeWriter.CreateBarcode("Hello, IronBarcode!", BarcodeWriterEncoding.QRCode)
barcode.ResizeTo(400, 400)
barcode.SetMargins(20)
barcode.SetForegroundColor(Color.Black)
barcode.SetBackgroundColor(Color.White)
barcode.AddCaptionAbove("Scan me with your smartphone!")
barcode.AddImageLogo("logo.png", 80, 80)
barcode.SaveAsImage("qrcode.png")
This code generates a QR code with the text "Hello, IronBarcode!" and customizes it by resizing it to 400x400 pixels, adding 20-pixel margins, setting the foreground color to black and the background color to white, adding a caption above the barcode, and adding a logo image.
IronBarcode is built on top of the open-source ZXing library, but it extends its capabilities to support a wider range of barcode types, including QR codes, Code 128, Code 39, EAN-13, EAN-8, UPC-A, and many more.
Here are some of the things that IronBarcode can do:
IronBarcode can easily generate barcodes of various types and styles, including linear and 2D barcodes, with customizable features such as colors, text, and image overlays. The following code snippet generates a QR Code:
var barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode);
barcode.SaveAsJpeg("QRCode.jpg");
var barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode);
barcode.SaveAsJpeg("QRCode.jpg");
Dim barcode = IronBarCode.BarcodeWriter.CreateBarcode("Hello World!", IronBarCode.BarcodeWriterEncoding.QRCode)
barcode.SaveAsJpeg("QRCode.jpg")
IronBarcode also provides a powerful barcode scanner that can read barcodes from images, PDFs, and live camera streams. The following code reads a QR Code from an image file:
var barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode);
Console.WriteLine(barcode.Text);
var barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode);
Console.WriteLine(barcode.Text);
Dim barcode = IronBarCode.BarcodeReader.Read("QRCode.jpg", IronBarCode.BarcodeReaderEncoding.QRCode)
Console.WriteLine(barcode.Text)
IronBarcode can also validate barcodes to ensure that they are valid and can be scanned by other barcode readers. The following code snippet validates a Code 128 barcode:
var barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128);
if (barcode.IsValid)
{
Console.WriteLine("Barcode is valid.");
}
else
{
Console.WriteLine("Barcode is invalid.");
}
var barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128);
if (barcode.IsValid)
{
Console.WriteLine("Barcode is valid.");
}
else
{
Console.WriteLine("Barcode is invalid.");
}
Dim barcode = IronBarCode.BarcodeReader.Read("Code128.jpg", IronBarCode.BarcodeReaderEncoding.Code128)
If barcode.IsValid Then
Console.WriteLine("Barcode is valid.")
Else
Console.WriteLine("Barcode is invalid.")
End If
IronBarcode can convert barcodes from one format to another, such as converting a Code 39 barcode to a QR Code. The following code snippet converts a Code 39 barcode to a QR Code:
var barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39);
var qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode);
qrCode.SaveAsJpeg("QRCode.jpg");
var barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39);
var qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode);
qrCode.SaveAsJpeg("QRCode.jpg");
Dim barcode = IronBarCode.BarcodeReader.Read("Code39.jpg", IronBarCode.BarcodeReaderEncoding.Code39)
Dim qrCode = IronBarCode.BarcodeWriter.CreateBarcode(barcode.Text, IronBarCode.BarcodeWriterEncoding.QRCode)
qrCode.SaveAsJpeg("QRCode.jpg")
Here are some of the ways IronBarcode is better than ZXing:
IronBarcode is a superior library to ZXing when it comes to performance, ease of use, output quality, supported formats, and licensing.
Looking to try out IronBarcode and see how it can enhance your barcode scanning and generation capabilities? We're excited to offer a free trial of IronBarcode for you to test out its features and benefits.
During your trial period, you'll have full access to all of IronBarcode's powerful features, including support for a wide range of barcode formats, advanced customization options, and seamless integration with your existing projects.
To start your trial, simply visit our website and download the IronBarcode package. You'll then have free trial to explore all that IronBarcode has to offer and see firsthand how it can streamline your barcode scanning and generation workflows.
9 .NET API products for your office documents