We are glad to announce that Aspose.Barcode for .NET now supports generating and reading DotCode barcodes.

DotCode is a 2D type that uses dots instead of bars to encode data. DotCode is a stacked symbology that suggests encoding information in multiple layers of dots. Each dot represents a binary digit (0 or 1); a set of dots is arranged in a grid to encode the input message. This barcode type is designed to provide high resistance to distortions, making it suitable for use in environments where barcode are likely to be damaged. DotCode barcodes can store data in various formats, including alphanumeric characters, Kanji characters, and binary data. Such barcodes can encode a large amount of data in a small area, which allows placing them on small areas or items with non-standard shapes. DotCode barcodes are used in various applications, including asset tracking, medical production, automotive industry, logistics, inventory management, industrial automation, and others.

In this article, we describe how to generate DotCode barcodes using the C# barcode API. Aspose.BarCode for .NET has been recently updated to enable the support for this 2D barcode type.

C# API Installation to Generate DotCode Barcode - Free Download

Developers can easily integrate Aspose.BarCode for .NET library into C# applications. The barcode library allows generating and reading over 60 barcode types within .NET applications. Download reference DLL files from the Releases page or install it from the NuGet Gallery using the command below:

PM> Install-Package Aspose.BarCode

Generate DotCode Barcodes in C#

To generate a DotCode barcode, it is first necessary to create a new instance of class BarCodeGenerator class, specify the barcode text in the CodeText propoerty, and set the symbology type in the BarcodeType property to “DotCode”. To create a DotCode barcode with a specific layout, it is necessary to set the Rows and Columns properties of class DotCodeParameters.

The DotCode standard has certain limitations on the number of rows and columns that can be used. It is recommended to use at least 7 rows and columns for better recognition. The minimal number of rows or columns allowed is 5. Additionally, the sum of the number of rows and columns in a DotCode barcode must be an odd number. If you only specify one of the layout parameters, the other will be determined automatically. If the specified number of rows and columns is not sufficient for generating a DotCode barcode, an exception will be thrown.

The code sample below explains how to generate DotCode barcodes in C#.

Generate DotCode with Structured Append

Structured append is a mechanism that allows for encoding a large amount of data in a series of smaller barcodes, rather than trying to fit all of the data into a single barcode. Each barcode in the set contains a portion of the total data, and when scanned together, the data from all of the barcodes is combined to form a complete message. The structured append mechanism suggests dividing the data into smaller parts and encoding each part in a separate barcode. Each barcode in the set is then labeled with a unique identifier, indicating its position in the set and the total number of barcodes in the set. The scanner can use this information to determine the order in which the barcodes should be read and how the data from each barcode should be combined to form the complete message.

By using structured append, data can be split across multiple DotCode barcodes, making it easier to scan and process the data. For example, in an inventory management application, you can use structured append to encode large item numbers or serial numbers that would otherwise be too large to fit into a single barcode. In a logistics and supply chain management application, structured append can be used to track large numbers of packages, each with a unique barcode.

The barcode library has a special generation mode for creating DotCode barcodes with structured append. This mode allows merging together up to 35 DotCode barcodes. To enable this generation mode, it is needed to set the following properties:

By setting these properties, you can activate the structured append mode and combine multiple DotCode barcodes into a single set.

The following code sample shows how to generate DotCode barcode in the structured append mode.

Get a Free License

You may evaluate the API without any limitations by requesting a free temporary license.

Conclusion

In this article, we introduced how to generate DotCode barcodes in C#. You can refer to the documentation section to explore other barcode generation and reading features. To raise any questions, please contact us via forum.