Recognize and generate DotCode barcodes using VintaSoft Barcode .NET SDK

Blog category: Barcode.NET

July 10, 2025

VintaSoft Barcode .NET SDK is a professional cross-platform SDK for Windows, Linux, macOS, Android, which allows you to recognize and generate DotCode barcodes in .NET, WPF, Web, MAUI. You only need a few lines of code to add the ability to recognize and generate DotCode barcodes to your .NET application.


What is a DotCode barcode?

DotCode is a two-dimensional matrix barcode designed to be reliably read when printed using high-speed inkjet or laser dot technologies. Using this barcode, dynamic data (production date, expiration date, serial number, etc.) can be applied to products at production line speeds. A distinctive feature of the DotCode barcode is the absence of any visible fixed patterns, as well as the matrix dots arranged in a "checkerboard" order:


Features of the DotCode barcode

The DotCode barcode is defined by the AIM standard from 2019, which describes the current version of DotCode Rev 4.

The DotCode barcode can store an unlimited amount of mixed data in three encoding modes:

Support for the GS1 standard allows you to encode data in GS1 format (BarcodeSymbologySubsets.GS1DotCode).

The DotCode barcode uses the Reed-Solomon error correction algorithm, which allows to recognize damaged barcodes.

The DotCode barcode can encode the following special characters:


Matrix structure

The DotCode matrix can be square or rectangular, allowing for flexible aspect ratio adjustments for different purposes. The minimum symbol size can be very small (up to 3x3 mm), making it ideal for marking compact items such as cigarette packs or pharmaceuticals.



VintaSoft Barcode .NET SDK can generate DotCode barcode as a raster or vector image, as well as a MatrixBarcodeStructure, which allows to perform the high-speed barcode printing.


What DotCode can VintaSoft Barcode .NET SDK recognize?

VintaSoft Barcode .NET SDK when recognizing DotCode barcodes uses unique algorithms that allow you to quickly recognize barcodes that have various problems:



Here is a C# code that demonstrates how to recognize DotCode barcodes in an image captured from a camera:
/// <summary>
/// Reads DotCode barcodes from a <see cref="System.Drawing.Bitmap"/>.
/// </summary>
/// <param name="bitmap">A bitmap with barcodes.</param>
public static void ReadDotCodeBarcodesFromBitmap(System.Drawing.Bitmap bitmap)
{
    // create barcode reader
    using (Vintasoft.Barcode.BarcodeReader reader = new Vintasoft.Barcode.BarcodeReader())
    {
        // specify that reader must search for DotCode barcodes
        reader.Settings.ScanBarcodeTypes = Vintasoft.Barcode.BarcodeType.DotCode;

        // read barcodes from image
        Vintasoft.Barcode.IBarcodeInfo[] infos = Vintasoft.Barcode.GdiExtensions.ReadBarcodes(reader, bitmap);

        // if barcodes are not detected
        if (infos.Length == 0)
        {
            System.Console.WriteLine("No barcodes found.");
        }
        // if barcodes are detected
        else
        {
            // get information about extracted barcodes

            System.Console.WriteLine(string.Format("{0} barcodes found:", infos.Length));
            System.Console.WriteLine();
            for (int i = 0; i < infos.Length; i++)
            {
                Vintasoft.Barcode.IBarcodeInfo info = infos[i];
                System.Console.WriteLine(string.Format("[{0}:{1}]", i + 1, info.BarcodeType));
                System.Console.WriteLine(string.Format("Value:      {0}", info.Value));
                System.Console.WriteLine(string.Format("Region:     {0}", info.Region));
                System.Console.WriteLine();
            }
        }
    }
}


What DotCode barcodes can VintaSoft Barcode .NET SDK generate?

VintaSoft Barcode .NET SDK generates all types of DotCode barcodes.

Here is the C# code that demonstrates how to generate a DotCode barcode bitmap:
/// <summary>
/// Returns the DotCode barcode as <see cref="System.Drawing.Bitmap"/>.
/// </summary>
/// <param name="value">The barcode value.</param>
/// <returns>A <see cref="System.Drawing.Bitmap"/> object.</returns>
public static System.Drawing.Bitmap GetDotCodeBarcodeAsBitmap(string value)
{
    // create the barcode writer
    using (Vintasoft.Barcode.BarcodeWriter barcodeWriter = new Vintasoft.Barcode.BarcodeWriter())
    {
        // set barcode writer settings
        barcodeWriter.Settings.Barcode = Vintasoft.Barcode.BarcodeType.DotCode;
        barcodeWriter.Settings.Value = value;

        // get a barcode image as System.Drawing.Bitmap
        return Vintasoft.Barcode.GdiExtensions.GetBarcodeAsBitmap(barcodeWriter);
    }
}


Here is a C# code that demonstrates how to generate a vector (SVG) image of a DotCode barcode:
/// <summary>
/// Returns the DotCode barcode in vector form as a SVG string.
/// </summary>
/// <param name="barcodeValue">Barcode value.</param>
public static void GetDotCodeBarcodeAsSvgString(string barcodeValue)
{
    // create the barcode writer
    using (Vintasoft.Barcode.BarcodeWriter barcodeWriter = new Vintasoft.Barcode.BarcodeWriter())
    {
        // set barcode writer settings
        barcodeWriter.Settings.Barcode = Vintasoft.Barcode.BarcodeType.DotCode;
        barcodeWriter.Settings.Value = barcodeValue;

        // generate DotCode barcode as a SVG string
        return barcodeWriter.GetBarcodeAsSvgFile();
    }
}