KA.Barcode for .NET Suite
How to Generate, Print Data Matrix in C#.NET
How to Generate 2D Data Matrix Barcode Images Using Visual C# in .NET Applications
  • Completely compatible with .NET Framework 2.0 and later versions
  • Easy to generate Data Matrix ECC 200 barcodes in Visual C#.NET programming
  • Dynamically generating Data Matrix in ASP.NET, WinForms, Crystal Reports and RDLC Reports
  • Draw Data Matrix barcode images in stream & graphics object and save in multiple image formats
  • Offer various barcode settings for Data Matrix including module width, format mode, margins, etc
  • Puchase royalty-free and permanent license of .NET Data Matrix Barcode Generator Library
C# Data Matrix Barcode Control Description
KA.Barcode for .NET Suite is a mature and reliable barcoding encoder control SDK for generating two-dimensional Data Matrix images in .NET development environment. Developers can easily create and display Data Matrix in ASP.NET web pages, Windows Forms & Crystal Reports with C# programming. Flexible barcode settings are also available for users to customize generated images.
What Is A Data Matrix Barcode
Data Matrix, also named as ECC200, 2D DataMatrix barcode, is a two-dimensional matrix barcode commonly used to mark small items. Being space-efficient, Data Matrix is recommended by American EIA for labeling small electronic components.
Data Matrix Barcode Creation in ASP.NET Using C#
This KeepAutomation barcode encoder dll for .NET also supports Data Matrix barcode generation in ASP.NET web applications. Users can easily create Data Matrix barcodes in Websites, Microsoft IIS as well as Visual C# Class Library & Console applications. Here are more details for you: How to print barcode in Visual C# with ASP.NET web control.
Data Matrix Barcode Generation in .NET WinForms Using C#
With KeepAutomation barcode generator for .NET Suite, developers can easily create Data Matrix barcodes in .NET Windows Forms with simple control drag-n-drop or C# class library. For more details or C# sample code, please view How to create barcode in .NET WinForms with Visual C#.
Data Matrix Barcode Making in Crystal Reports Using C#
KA.Barcode for .NET Suite enables developers to add batch Data Matrix barcodes to Crytal Reports without using any third party tool, like barcode fonts or plugins. Multiple linear and 2D barcode types are supported with barcode settings available. Click link here for more details: How to create barcode in Crystal Reports with Visual C#.
Data Matrix Barcode Adding in RDLC Reports Using C#
KA.Barcode for .NET Suite supports Microsoft Report Definition Language scenarios such as Visual Studio 2005 / 2008 / 2010 ReportViewer Local Reports (RDLC). With this barcode library SDK, users can print multiple Data Matrix barcodes in no time without using fonts or other third party tool. View more details here: How to create barcode in RDLC Reports with C# code.
Data Matrix Barcode Generation in .NET Applications with C#
Here is the easiest way to encode barcodes with this barcode maker using Visual C# Class Library. What given below is detailed C# sample code to create Data Matrix barcodes in C# class, with all barcode properties available for adjustment. Copy the code to your project now and debug to view generated barcodes!
C# Sample code
     BarCode datamatrix = new BarCode();
datamatrix.Symbology = KeepAutomation.Barcode.Symbology.DataMatrix;

//Data Matrix encoding valid input: All ASCII characters, including 0-9, A-Z, a-z, special characters
datamatrix.CodeToEncode = "DataMatrix";

//KeepAutomation provides the following Data Matrix Barcode Data Formats:
//ASCII: All ASCII characters, including 0-9, A-Z, a-z and special characters like $ , % + / : * etc.
//Auto: KeepAutomation will select proper data format according to your encoding value.
//Base256: to encode images, double-byte characters, binary data and 8 bit values.
//C40: 0-9, A-Z
//Edifact: 0-9, A-Z, many punctuation marks
//Text: 0-9, a-z
//X12: 0-9, A-Z, and some punctuation marks.
datamatrix.DataMatrixDataMode = DataMatrixDataMode.Auto;
datamatrix.DataMatrixFormatMode = DataMatrixFormatMode.FM_12X12;

//Set Data Matrix image size
//Data Matrix Unit of measure, support pixel, cm and inch.
datamatrix.BarcodeUnit = BarcodeUnit.Pixel;
// Data Matrix image resolution in dpi
datamatrix.DPI = 72;
// Data Matrix bar module width (X dimention)
datamatrix.X = 3;
//Bar module height (Y dimention), Y=X
datamatrix.Y = 3;

//Data Matrix image left margin size(quiet zone), the minimum value is X.
datamatrix.LeftMargin = 9;
//Image right margin size, the minimum value is X.
datamatrix.RightMargin = 9;
datamatrix.TopMargin = 9;
datamatrix.BottomMargin = 9;
//Barcode image orientation, 0, 90, 180 and 270 degrees supported.
datamatrix.Orientation = KeepAutomation.Barcode.Orientation.Degree0;

//Generate Data Matrix barcodes in PNG image format

/* Create Data Matrix barcodes in Stream object
datamatrix.generateBarcodeToStream(".NET System.IO.Stream Object");

Draw & Print Data Matrix barcodes to Graphics object
datamatrix.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");

Generate Data Matrix barcodes & write to byte[]
byte[] barcodeInBytes = datamatrix.generateBarcodeToByteArray();

Generate Data Matrix barcodes & encode to System.Drawing.Bitmap object
Bitmap barcodeInBitmap = datamatrix.generateBarcodeToBitmap();