Aspose.BarCode  for .NET

Barcode generator and reader API

Create, & recognize barcodes of linear, 2D and postal types within any .NET application.

  Download Free Trial
  
 

Aspose.BarCode for .NET is a powerful development library to generate & recognize 1D & 2D barcodes from various image types at any angle. Developers can easily add barcode generation and scanning functionality to their .NET applications. This API allows exporting generated barcodes to different high-quality image formats.

Aspose.BarCode for .NET enables modifying the appearance of generated barcodes and their parameters, such as background color, bar color, rotation angle, x-dimension, image quality, resolution, captions, size, and many others. It also provides rich barcode detecting and reading functionality and supports over 60 barcode types.

Advanced .NET Barcode API Features

Customize Barcode Types and Appearance

The barcode API for .NET allows developers to fine-tune the appearance of generated barcodes by specifying the barcode type, input text, font style, background and foreground colors, caption alignment and location, and other properties. You can modify the caption by setting its visibility for upper and lower captions, the font, colors, and alignment.

Barcode Generation Live Example

Barcode generator API enables developers to create barcodes by specifying the required barcode type, setting input text (data to be encoded in a barcode image), and customizing appearance-related properties, such as background and foreground color, font, text location (hide, above, or below), and alignment. Two-dimensional barcodes, such as QR Code, PDF417, Data Matrix, Aztec Code, etc. in the same way as of one-dimensional ones.

Code to be executed - C#


// Initialize barcode generator
using (var generator = new Aspose.BarCode.Generation.BarcodeGenerator(EncodeTypes.QR, ""))
{
  // Set parameters
  generator.Parameters.Barcode.XDimension.Millimeters *= 2;
  generator.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.Below;

  // Generate image
  Bitmap res = generator.GenerateBarCodeImage();
}
Generation result

Read Damaged Barcodes

The barcode library supports various settings to scan and decode damaged or distorted barcodes. It allows successfully reading barcode images with various defects, such as Gaussian noise, inverted colors, white spots, visual artifacts, colored background, and missing bars. To improve barcode readability, the API enables special methods and mechanisms, including median filtering, "salt-and-paper" filtering, reducing image size, and others. Moreover, the barcode library benefits from advanced methods to decode industrial Data Matrix barcodes, read severely damaged QR codes, and even restore some data from incorrect barcodes.

Barcode Recognition Live Example

The barcode reader API provides a set of features for scanning, detecting, and reading 1D, 2D, and postal barcodes. With just a few lines of code, developers can easily integrate this functionality into their applications and use it to detect and decode a wide range of commonly used barcodes. The API is designed to be user-friendly and intuitive, making it easy for developers to quickly and easily add barcode scanning capabilities to their applications.

Ready to recognize Recognizing Drop a file here or click to browse *

* By uploading your files or using the service you agree with our Terms of use and Privacy Policy.

Code to be executed - C#

    
// Initialize barcode reader
using (var reader = new Aspose.BarCode.BarCodeReader("<file name>", DecodeType.AllSupportedTypes))
{
    // Recognize barcodes on the image
    foreach (var barcode in reader.ReadBarCodes())
    {
        // Display the recognition result
        Console.WriteLine($"{barcode.CodeTypeName}: {barcode.CodeText}");
    }
}

Recognition result

What People Are Saying

Don't just take our word for it. See what users have to say about APIs.

 
 
View Case Studies
  

Support and Learning Resources