.NET Barcode for (.NET Barcode Generator supports Linear, PDF417, Data Matrix and QR-Code)

.NET Barcode  >  .NET Barcode Generate Guide  >  .NET Data Matrix Generator for .NET, C#, ASP.NET, VB.NET

 

.NET Data Matrix Generator for .NET, C#, ASP.NET, VB.NET

Create & Generate Data Matrix Barcodes in C#, VB.NET, ASP.NET

Data Matrix code is a two-dimensional matrix barcode consisting of black and white "cells" or modules arranged in either a square or rectangular pattern. The information to be encoded can be text or raw data. Usual data size is from a few bytes up to 2 kilobytes. The length of the encoded data depends on the symbol dimension used. Error correction codes are added to increase symbol strength: even if they are partially damaged, they can still be read. A Data Matrix symbol can store up to 2,335 alphanumeric characters.

.NET Barcode Data Matrix prints:

  • all 128 characters of ASCII
  • values 128-255 in accordance with ISO 8859-1. There are referred to as extended ASCII.



.NET Barcode Data Matrix Generator - C#, VB.NET Data Matrix Generating Sample Code



1. How to generate Data Matrix barcodes in C# Class?

   using BusinessRefinery.Barcode;

   // construct a DataMatrix barcode object
   DataMatrix barcode = new DataMatrix();  
    
   // set Data Matrix code text to encode		      
   barcode.Code = "Data Matrix in C#";  
    
   //draw barcode and save Data Matrix into image file in gif format   
   barcode.drawBarcode2ImageFile("data-matrix-in-csharp.gif");    

2. How to generate Data Matrix barcodes in VB.NET Class?

// construct a DataMatrix barcode object
Dim barcode As BusinessRefinery.Barcode.DataMatrix
barcode = New BusinessRefinery.Barcode.DataMatrix()

// set Data Matrix code text to encode	
barcode.Code = "Data Matrix in VB.NET"

//draw barcode and save into image file in gif format  
barcode.drawBarcode2ImageFile("data-matrix-in-vbnet.gif")


3. How to draw Data Matrix barcodes to image files (GIF, JPEG, BMP, PNG, & TIFF)?

            using BusinessRefinery.Barcode;

            DataMatrix barcode = new DataMatrix();
            barcode.Code = "Data Matrix in C#";
            barcode.drawBarcode2ImageFile("data-matrix-in-csharp.png");

You can draw other file formats, by change file types to .jpg, .bmp, .png, and .tif.



4. How to draw & print Data Matrix barcodes to .NET objects like Graphics, Stream, Bitmap?

            using BusinessRefinery.Barcode;

            DataMatrix barcode = new DataMatrix();
            barcode.Code = "C# Data Matrix Generator";

            barcode.drawBarcode2Stream("Stream object");

            Bitmap barcodeInBitmap = barcode.drawBarcodeOnBitmap();

            barcode.drawBarcodeOnGraphics("Graphics object");



5. How to create Data Matrix barcodes in C# or VB.NET Windows Application using .NET Barcode Generator Windows Control Library?

  1. add BusinessRefinery.Barcode.Win.dll to your .NET Windows Application project reference

  2. add .NET Barcode Generator .NET Windows Control Library to .NET Visual Studio Toolbox



6. How to create Data Matrix barcodes in ASP.NET Web Application using ASP.NET Barcode Generator Web Control Library?

  1. add BusinessRefinery.Barcode.Web.dll to your ASP.NET project reference

  2. add ASP.NET Barcode Generator ASP.NET Web Control Library to .NET Visual Studio Toolbox



.NET Barcode Data Matrix Generator - Data Matrix Property Settings



Basic

  • Code : Data Matrix encoding data value.

    HTTP Parameter: code; Default Value: ""

  • DataMode : Data Matrix encoding data mode.

    HTTP Parameter: data-mode; Default Value: 0 (MODE_AUTO)

  • FormatMode : Data Matrix encoding format mode.

    HTTP Parameter: format-mode; Default Value: 0 (FORMAT_10X10)

  • ProcessTilde

    HTTP Parameter: process-tilde; Default Value: false

  • FNC1Mode

    HTTP Parameter: fnc1-mode; Default Value: 0 (FNC1_NONE)

  • AI : Application Indicator

    HTTP Parameter: ai; Default Value: 0

Barcode Size

  • BarcodeUnit : Unit of meature for all size related properties. 0: Pixel (default); 1: CM; 2: Inch.

    HTTP Parameter: barcode-unit; Default Value: 0 (UOM_PIXEL)

  • ModuleSize : bar module width & height, default is 3 pixel

    HTTP Parameter: module-size; Default Value: 3.0f

  • leftMargin : generated barcode image left margin

    HTTP Parameter: left-margin; Default Value: 0.0f

  • rightMargin : generated barcode image right margin

    HTTP Parameter: right-margin; Default Value: 0.0f

  • topMargin : generated barcode image top margin

    HTTP Parameter: top-margin; Default Value: 0.0f

  • bottomMargin : generated barcode image bottom margin

    HTTP Parameter: bottom-margin; Default Value: 0.0f

  • resolution : generated data matrix image resolution in dpi

    HTTP Parameter: resolution; Default Value: 72 dpi

  • rotate : barcode data matrix rotate angle, valid values: 0 (ROTATE_0), 1 (ROTATE_90), 2 (ROTATE_180), 3 (ROTATE_270)

    HTTP Parameter: rotate; Default Value: 0 (ANGLE_0)

  • barcodeWidth

    HTTP Parameter: barcode-width; Default Value: 0

  • barcodeHeight

    HTTP Parameter: barcode-height; Default Value: 0



Multiple Data Matrix

  • StructuredAppend

    HTTP Parameter: structured-append; Default Value: false

  • SymbolCount

    HTTP Parameter: symbol-count; Default Value: 0

  • SymbolIndex

    HTTP Parameter: symbol-index; Default Value: 0

  • FileID

    HTTP Parameter: file-id; Default Value: 0







ALL RIGHTS RESERVED. Business Refinery (c) 2006 - 2010. C#.NET QR Code, Code 128 Java, QRCode Java, QR Code C#.NET, Code 39 Java