Read Barcodes using C# Barcode API

scan and read barcode in C#

In the previous article, you have learned how to generate various types of barcodes programmatically. In this article, you will learn how to read the barcodes using C# barcode reader API. The article will also cover how to read particular or different types of barcode symbologies in an image.

C# API to Read Barcodes

Aspose.BarCode for .NET provides a powerful barcode scanner and reader API that lets you read a variety of barcode symbologies within a few lines of code. You can either download the API or install it within your .NET application using NuGet.

PM> Install-Package Aspose.BarCode

Read Barcodes using C#

The following are the steps to read a 1D or 2D barcode from an image file.

The following code sample shows how to read a barcode using C#.

Read a Particular Barcode Symbology in C#

There could be the case when you already know about the symbology of the barcode you are going to read. In such situations, you can provide the barcode’s type to the BarCodeReader‘s object. Knowing the type beforehand speeds up the barcode recognition process. The following code sample shows how to specify the barcode’s type.

Scan Multiple Barcode Symbologies in a Single Image

In particular cases, you might have multiple barcode symbologies placed in a single image. For such a case, you can configure the API to recognize all the barcodes in one go. The following are the steps to read multiple barcodes in a single image.

The following code sample shows how to read multiple barcode symbologies in a single image using C#.

Conclusion

In this article, you have learned how to read barcodes programmatically using C#. In addition, you have seen how to read one or multiple barcode symbologies in a single image. You can learn more about C# barcode reader API using the documentation.

See Also