English
 English

.NET Barcode API to Read, Recognize, and Generate Barcodes and QR Codes

Generate barcodes in .NET with unmatched accuracy and scan, read, and recognize linear, 2D, and postal barcodes of different symbologies using the C# .NET barcode API. It supports scanning and detecting barcodes and QR codes in JPG, PNG, GIF, BMP, and TIFF formats.

Download Free TrialView All APIs

Build barcode recognition and QR code generator apps in C# .NET

Aspose.BarCode for .NET is a high-performance barcode generation and recognition API enabling .NET developers to create, scan, read, detect, and export different types of 1D (linear), 2D, and postal barcodes. Boasting a great feature set, this .NET barcode generator API offers immaculate accuracy while reading or scanning the barcode images in PNG, BMP, JPG, GIF, TIFF, and other formats. Furthermore, you can also export the barcodes to popular raster images or EMF and SVG vector files. Together with the barcode and QR code scanning features, Aspose.BarCode for .NET lets you manipulate several elements of the barcode appearance including the image quality, file size, background & bar color, image quality and resolution, rotation angle, captions, and many more.

Using the barcode API for .NET, you can quickly and easily integrate QR code scanner functionality in your existing .NET barcode processing solutions or build comprehensive barcode recognition apps in C#, ASP.NET, or VB.NET from scratch. Aspose.BarCode for .NET library supports more than 50 linear, 2D, and postal barcode symbologies such as Code 128, Code 39 Extended, Data Matrix, QR Code, PDF 417, and Postnet.

Getting Started

Before setting up the .NET barcode API at your end, please check the prerequisites on the System Requirements page to ensure a smooth API setup and user experience.

Aspose.BarCode for .NET Installation

Please visit the downloads section to directly download the DLLs or the MSI installer of the .NET barcode recognition and generation API. You can install the API using the NuGet package as well. Please find below the command for the package manager console:

PM > Install-Package Aspose.BarCode 

How to Generate QR Codes in .NET and Read Barcodes from Images

With Aspose.BarCode for .NET, developers can incorporate QR code generation capability into their .NET barcode processing apps. Moreover, recognizing different types of barcodes from PNG, JPEG, BMP, and other images is also possible. You can scan and read multiple barcode types from the same image file.

Quickly Generate QR Codes in .NET

The .NET barcode API supports generating QR codes with different types of encoding. You can add this functionality to your barcode manipulation applications and further enhance your offerings. Please check the following information and C# coding to quickly and easily generate QR codes using Aspose.BarCode for .NET library:

  • Instantiate the BarcodeGenerator class and specify the EncodeType and the input text.
  • Set the QR code version and encoding type.
  • Generate and save the QR Code image in PNG format.
// Initialize an instance of BarcodeGenerator class
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.QR, "Aspose");
gen.Parameters.Barcode.XDimension.Pixels = 4;
// Set Auto version
gen.Parameters.Barcode.QR.QrVersion = QRVersion.Auto;
//Set ForceMicroQR QR encode type
gen.Parameters.Barcode.QR.QrEncodeType = QREncodeType.ForceMicroQR;
gen.Save(dataDir + "QREncodeTypeForceMicroQR.png", BarCodeImageFormat.Png);

Read Barcodes from Images in .NET

Aspose.BarCode for .NET API makes reading barcodes of different symbologies from PNG, JPEG, BMP, GIF, and other image file formats easier. This .NET barcode recognition and generation API supports scanning and reading multiple barcodes from the same image. Please check the following information for more help:

  • Load the source barcode image using the BarCodeReader class.
  • Call the ReadBarCodes() method to get recognition results in the BarCodeResult class object.
  • Loop through the obtained results and display the barcode’s type and text.
// Initialize barcode reader
BarCodeReader reader = new BarCodeReader("C:\\Files\\BarCode\\Sample.png");

// Read the barcode and show the results
foreach(BarCodeResult result in reader.ReadBarCodes()) 
{
    Console.Out.WriteLine("CodeText: " + result.CodeText);
    Console.Out.WriteLine("Symbology type: " + result.CodeType);
}

Please visit the GitHub Examples page for more working examples of the .NET barcode API. If you are looking to scan, recognize, and generate 1D, 2D, and postal barcodes or QR codes on the fly using your mobile devices, please check the free online apps of Aspose.BarCode.

Easy integration and advanced operations

Aspose.BarCode for .NET allows super easy operations requiring only a few lines of .NET coding to start generating, reading, and recognizing different types of barcodes. As a .NET developer, you can effortlessly integrate the .NET barcode generator API with any of your .NET apps. One of the best features of this library is the ability to read damaged barcodes and QR codes using intricate algorithms and filtering mechanisms enabling you to stay on top of your barcode processing needs.

FAQ

1. How can I generate barcodes in .NET?

Generating 1D, 2D, and postal barcodes in .NET is quick and easy using Aspose.BarCode for .NET API. Only a few lines of .NET coding are needed to generate the barcode of your desired type.

2. How long it takes to read or generate barcodes?

The .NET barcode recognition and generation API works fast and completes your requests in no time.

3. Is it safe to process files using the .NET API?

You can be sure of the security of your barcode files while processing them using Aspose.BarCode for .NET API. We ensure the privacy of your data and take all required measures to provide you with a secure user experience.

4. Can I recognize and generate barcodes on Mac OS, Windows, or Linux?

Yes, the barcode API for .NET works across different OS, frameworks, and operating environments. You can use it on the platform of your choice and it does not require any additional software installation to function.

Looking for help?

Checkout our support channels for help with your questions related to Aspose product API features and working.

Ready to get started?

Download Free Trial View All APIs