DataMatrix is a two-dimensional
(2D) barcode symbology which can store from 1 to about 2,000 characters.
DataMatrix ECC200 version supports advanced encoding error checking and
correction algorithms (reed-solomon). Those algorithms allow the recognition of
barcodes that are up to 60% damaged.
DataMatrix is being used to encode product and serial number
information on electrical rating plates; to mark of surgical instruments in
Japan; to identify lenses, circuit boards, and other items during
manufacturing.
Barcode Library supports all DataMatrix Formats and the
data represented in the symbol can be compressed using one of following
algorithms.
ASCII (0): it is used to encode data that mainly contains ASCII characters (0-127). This is the default encoding format by Barcode Library.
C40 (1): it is used to encode data that mainly contains numeric and upper case
characters.
Text (2): it is used to encode data that mainly contains numeric and lower case
characters.
Copy folder barcode from your downloaded package, to your IIS folder, e.g. C:\Inetpub.
Create a new virtual directory, named barcode.
Restart IIS.
Test your installation, goto http://YourDomain:port/barcode/datamatrix.aspx?Data=ABC 123456789
To create barcode image in your ASP.NET application, you can pass the url to IMG tag src value.
For example, <img src="http://YourDomain:port/barcode/datamatrix.aspx?Data=ABC 123456789" />
Integrate Barcode Controller to your ASP.NET project.
Copy BarcodeLib.Barcode.dll to the folder bin of your web application the barcodes are needed for.
Copy datamatrix.aspx file to your web application.
Add barcode library to your Visual Studio Toolbox.
Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
Right click Toolbox, click menu Choose Items...
Goto .NET Framework Components tab.
Check component DataMatrixWebForm, and its namespace is BarcodeLib.Barcode.DataMatrix
If no component found, click Browse... button and select BarcodeLib.Barcode.dll file.
Now you can see the component displayed on Toolbox. You can drag DataMatrixWebForm on your aspx page, change barcode setting through properties window.
Add Reference BarcodeLib.Barcode.dll to your project. Do not copy the dll to the bin directory, Visual Studio will do so, during project compilation time.
In your .NET windows project, right click mouse over Refereces in your Solution Explorer window. Then click menu "Add Reference ...".
Add BarcodeLib.Barcode.dll to your project.
Add barcode library to your Visual Studio Toolbox.
Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
Right click Toolbox, click menu Choose Items...
Goto .NET Framework Components tab.
Check component DataMatrixWinForm, and its namespace is BarcodeLib.Barcode.DataMatrix
If no component found, click Browse... button and select BarcodeLib.Barcode.dll file.
Now you can see the component displayed on Toolbox. You can drag DataMatrixWinForm on your form, change barcode setting through properties widnow.
Add Reference BarcodeLib.Barcode.dll to your .NET project (ASP.NET website, Forms, any .NET project)
In your .NET class.
BarcodeLib.Barcode.DataMatrix.DataMatrix barcode = BarcodeLib.Barcode.DataMatrix.DataMatrix();
barcode.Data = "your barcode data";
// other barcode settings.// save barcode image into your system
barcode.drawBarcode("c:/barcode.gif");
Above code written in C# 2005
* Please set properties UOB and Resolution, before you set any image size related properties like ModuleSize, LeftMargin.
Set the Data property with the value to encode. Type is string.
Set the BinaryData property with the binary value to encode. Type is byte[]. Once this property value is not null, barcode library will encode this value instead of property Data's value.
Set the Encoding property. Valid value is DataMatrixEncoding.ASCII (default), DataMatrixEncoding.C40, DataMatrixEncoding.Text, DataMatrixEncoding.Base256.
ASCII (0): it is used to encode data that mainly contains ASCII characters (0-127).
C40 (1): it is used to encode data that mainly contains numeric and upper case
characters.
Text (2): it is used to encode data that mainly contains numeric and lower case
characters.
Base256 (3): it is used to encode 8 bit values.
Set the Format property. Type is DataMatrixFormat. Default is DataMatrixFormat.Auto. Specifies the DataMatrix Format to use on that symbology.
Setting up barcode image size:
Set property UOM (Unit of Measure) for properties ModuleSize, LeftMargin, RightMargin, TopMargin and BottomMargin.
Default is UnitOfMeasure.Pixel (0). Valid values are UnitOfMeasure.Pixel (0), UnitOfMeasure.CM (1), UnitOfMeasure.Inch (2).
Set the ModuleSize (for bar cell width and height). Type is float. Default is 5.
Set the LeftMargin, RightMargin, TopMargin and BottomMargin properties.
Types are all float. Default are 10.
Set the Resolution property (Value is expressed in DPI - Dots per inch). This property is not working in Windows Controller, we will use end user's windows resultion.
Set the ImageFormat property for barcode image type. Value can be "gif", "jpg", "png", and "bmp", default is "png".
Set the ProcessTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is true.
~1: is used to represent the FNC1 code
~2: is used to represent the Structured Append and must be followed by a
3-digit number between 1 and 255
~3: is used only at the very beginning of the symbol for the reader programming
purpose.
~5: is used only at the very beginning of the symbol, the header [)> + ASCII 30
+ ASCII 05 + ASCII 29 will be transmitted by the barcode reader before the data
in the message and the trailer ASCII 30 + ASCII 4 will be transmitted
afterwards.
~6: is used only at the very beginning of the symbol, the header [)> + ASCII 30
+ ASCII 06 + ASCII 29 will be transmitted by the barcode reader before the data
in the message and the trailer ASCII 30 + ASCII 4 will be transmitted
afterwards.
~7NNNNNN: is used to specify the Extended Channel and NNNNNN is a value between
000000 and 999999.
~dNNN: is used to represent the ASCII character with the value of NNN.
Copyright 2009 BarcodeLib.com.
Provides High Quality
Data Matrix .NET, .net datamatrix, .net data matrix, datamatrix .net,
Data Matrix ASP.NET, c# data matrix, vb.net data matrix.
All rights reserved.