BizCode Generator for .NET Ultimate
The most robust & powerful barcode generating SDK for Microsoft .NET Framework
Quick Overviews
  • Mature barcode creating SDK
  • Support .NET 2.0/3.0/4.0
  • 100% developed in C#.NET
  • Dynamic barcodes support
  • User-defined controls provided
How to Generate Data Matrix images in C#
Data Matrix Generator for C#.NET is one of function of BizCode Generator for .NET Ultimate, which can be completely integrate with C#.NET development environments and add advance 2D barcode generating and printing features to create Data Matrix barcodes in your Visual C#.NET IDEs.
High-usability image controls over barcode resolution, image format, rotation and symbol placement are provided for user to customize Data Matrix barcodes according to their needs. This document describes how to customize Data Matrix image; more tutorials about Data Matrix size and data setting, please link to:
Data Matrix Image Related Properties

GS1 Data Matrix

Users may easily generate Data Matrix that is compatible with the latest GS1 barcode specification standard with FNC1Mode properties provided by BizCode Generator for .NET Ultimate.

Structure Append

Users may easily link up to 16 Data Matrix symols that can be restructured into a format one with StrutureAppend related properties provided by BizCode Generator for .NET Ultimate.

Barcode Resolution

Users may easily change barcode resolution in DPI that can be used for both high-resolution output and low-resolution output printers with Resolution property provided by BizCode Generator for .NET Ultimate.

Barcode Rotation

Users may easily change barcode rotation angle into 0, 90, 180 and 270 degrees that can be recognized by all scanners with Rotate property provided by BizCode Generator for .NET Ultimate.

Image Formats

Users may easily save barcode images into various image formats for different purpose, like Png, Jpeg/Jpg, Gif, Tiff, Bmp, with ImageFormat property provided by BizCode Generator for .NET Ultimate.

C#.NET Graphic Objects

Users may easily save barcode images into .NET graphic objects, Graphics, Stream and Bitmap objects, with DrawBarcode property provided by BizCode Generator for .NET Ultimate.
Customize Data Matrix Barcode Images in C#.NET
If you want to customize Data Matrix image in C#.NET, be sure that you have installed:
Customize Data Matrix Barcode Images in .NET Project Using C# Class
Copy those following code onto your C#.NET projects:
using BusinessRefinery.Barcode;

DataMatrix barcode = new DataMatrix();
barcode.Code = "0123456789";

barcode.drawBarcode2ImageFile("c:/data-matrix-csharp.gif");
Create GS1 compatible Data Matrix barcode
FNC1Mode default value in BizCode Generator for .NET Ultimate is FNC1_NONE.

Copy those following code to make GS1 compatible Data Matrix:
barcode.FNC1Mode = FNC1.FNC1_1ST_POS;
Generate Mutilpe Data Matrix Barcode with Structure Append
StructureAppend default value in BizCode Generator for .NET Ultimate is false. And SymbolCount, SymbolIndex and Parity default value is 0 respectively.

Copy those following code to make multiple Data Matrix barcodes:
barcode.StructureAppend = true;
barcode.SymbolCount = 3;
barcode.SymbolIndex = 0;
barcode. = 10;
barcode.SymbolCount = 3;
barcode.SymbolIndex = 1;
barcode.Parity = 10;
barcode.SymbolCount = 3;
barcode.SymbolIndex = 2;
barcode.Parity = 10;
Adjust Data Matrix Barcode Quiet Margin
BottomMargin, TopMargin , LeftMargin and RightMargin default value in BizCode Generator for .NET Ultimate is 0 respectively.

Copy those following code to change your quiet margin size:
barcode.BottomMargin = 7;
barcode.TopMargin = 7;
barcode.LeftMargin = 5;
barcode.RightMargin = 5;
Change Data Matrix Image Rotation
Resolution default value in BizCode Generator for .NET Ultimate is Rotate.Rotate0.

Copy those following code to change your image rotation angle:
barcode.Rotate = Rotate.Rotate180;
Save Data Matrix in Multiple Image Formats
Format default value in BizCode Generator for .NET Ultimate is gif.

Copy those following code to change your image format:
barcode.Rotate = Rotate.Rotate180;
Save Data Matrix in Multiple Image Formats
Format default value in BizCode Generator for .NET Ultimate is gif.

Copy those following code to change your image format:

barcode.Format = ImageFormat.Png;
barcode.drawBarcode2ImageFile("c:/ean-128-csharp.Png");
Users may change image format into gif, png, tiff, jpeg, png; or save it as C#.NET graphic objects:
public void drawBarcode2ImageFile(string filename);
public void drawBarcode2Stream(Stream fileStream);
public byte[] drawBarcodeAsBytes();
public Bitmap drawBarcodeOnBitmap();
public void drawBarcodeOnGraphics(Graphics graphics);