.NET Data Matrix barcode generator for c#, vb.net
How to generate, print data matrix 2d barcode label using c#, vb.net, in asp.net, winodws application, with free c# example
Free c#, vb.net examples to generate, print data matrix 2d barcode in asp.net, c#, vb.net, crystal reports.
- Fully compatible with ISO/IEC 16022 (2nd edition) for valid Data Matrix output
- Barcode creation control entirely developed in managed C#.NET
- Completely integrate with Microsoft Visual Studio 2005/2008/2010
- 2D Data Matrix barcode image generation in .NET applications
- Provide complete developer guide for 2D Data Matrix generation in .NET
- Advanced and reliable 2D Data Matrix barcode generating DLL used world-wide
- Provide royalty-free and perpetual developer licenses for customers
Data Matrix Generator for .NET Overview
Data Matrix Generator is barcode generation functionality included in KA.Barcode for .NET Suite that can integrate professional 2D Data Matrix barcode images in .NET Windows applications, ASP.NET web pages, Crystal Reports, SSRS, and other .NET projects.
2D Data Matrix Barcode Introduction
Data Matrix is a two-dimensional (2D) barcode symbology used in many industries. It is recommended by the United States' Electronic Industries Alliance (EIA) for labeling small electronic components. Data Matrix is the only 2 dimensional barcode defined in GS1 System of Standards.
Data Matrix Encodable Characters
- Standard ASCII characters: 0-127 including A-Z, a-z, 0-9 and special characters
- Extended ASCII characters: 128-255
Download .NET Data Matrix Barcode Generator
We offer free trial package download of KA.Barcode for .NET Suite to allow valid Data Matrix barcode generation in .NET projects. Useful items are included in the unzipped package(KeepAutomation.Barcode.Crystal.dll, KeepAutomation.Barcode.Crystal.dll, KeepAutomation.Barcode.SSRS2005.dll, KeepAutomation.Barcode.SSRS2005CRI.dll, KeepAutomation.Barcode.SSRS2008.dll, KeepAutomation.Barcode.SSRS2008CRI.dll, KeepAutomation.Barcode.Web.dll and KeepAutomation.Barcode.Windows.dll). Generate Data Matrix Barcode in .NET Using C# or VB.NET
- Move to the Visual Studio Solution Explorer window, and add "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" as reference of the project.
- Use the following C# or VB sample code to generate Data Matrix barcode image.
C# Sample code
BarCode datamatrix = new BarCode(); datamatrix.Symbology = KeepAutomation.Barcode.Symbology.DataMatrix; datamatrix.CodeToEncode = "Data Matrix"; datamatrix.X = 3; datamatrix.Y = 3; datamatrix.generateBarcodeToImageFile("c://barcode-datamatrix-csharp.png"); VB Sample code
Dim datamatrix As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
datamatrix.Symbology = KeepAutomation.Barcode.Symbology.DataMatrix datamatrix.CodeToEncode = "Data Matrix" datamatrix.X = 3 datamatrix.Y = 3 datamatrix.generateBarcodeToImageFile("c:/barcode-datamatrix-vbnet.png") Generate Data Matrix Barcode in ASP.NET Project
- Unzip the downloaded .NET Data Matrix barcode generator trial package.
- Open your Visual Studio to create a new ASP.NET project and copy "barcode.aspx" and "barcode.aspx.cs" in "barcode" folder to your project folder.
- Browse and select "KeepAutomation.Barcode.Web.dll" and add it to your project reference.
- Drag and drop "BarCodeControl" in Toolbox to the aspx page for your Data Matrix barcode generation.
- Select DataMatrix barcode symbology in Properties window.
- Debug and you will see the generated Data Matrix barcode image.
Data Matrix barcode image generation in Microsoft Internet Information Services
- Unzip the downloaded trial package and copy the "barcode" folder in it to your IIS web application folder.
- Establish a virtual directory (named as "barcode") in your IIS and restart it.
- Open your browser and navigate to:
"http://YourDomain:port/barcode/barcode.aspx?symbology=101&code-to-encode=0123456789&x=3&y=3". - Or you can also use the following image tag to insert barcodes in html or aspx pages:
<img src="barcode/barcode.aspx?symbology=101&code-to-encode=0123456789&x=3&y=3"/> - Reset properties of the generated Data Matrix barcode image in the above URL.
Generate Data Matrix Barcode in .NET WinForms
- Locate KeepAutomation.Barcode.Windows.dll to the Toolbox in your Visual Studio.
- Then, drag and drop the BarCodeControl from the Toolbox into the form.
- Switch to the Properties window and change "Symbology" to "DataMatrix".
- Now, you can see the created Data Matrix barcode image.
- Or you can also customize your Data Matrix barcode image through the Properties window.
Generate Data Matrix Barcode in .NET Reports
Detailed Guide for Generating 2D Data Matrix Barcode Image in Crystal Reports
Detailed Guide for Generating 2D Data Matrix Barcode Image in RDLC Reports
Detailed Guide for Generating 2D Data Matrix Barcode Image in Reporting Services
Data Matrix Property Settings
Class Attribute
|
HTTP Attribute
|
Default Value
|
Note
|
Basic
|
Symbology
|
symbology
|
Code128Auto
|
Barcode symoblogy type
|
CodeToEncode
|
code-to-encode
|
"128"
|
Barcode value to encode.
|
ChecksumEnabled
|
checksum-enabled
|
false
|
It is not applied for Data Matrix
|
ImageFormat
|
image-format
|
ImageFormat.Png
|
Barcode encoded image format.
|
Barcode Size
|
AutoSizeAdjust
|
auto-size-adjust
|
false
|
If true, barcode X, Y module will be auto-adjusted.
|
BarcodeUnit
|
barcode-unit
|
BarcodeUnit.Pixel
|
Unit of measure for all size related settings. 0: pixel; 1: inch; 2: cm.
|
X
|
x
|
1
|
Barcode module width (narrow bar).
|
Y
|
y
|
50
|
Linear barcode bar height / 2D barcode module height.
|
LeftMargin
|
left-margin
|
0
|
Barcode image left margin.
|
RightMargin
|
right-margin
|
0
|
Barcode image right margin.
|
TopMargin
|
top-margin
|
0
|
Barcode image top margin.
|
BottomMargin
|
bottom-margin
|
0
|
Barcode image bottom margin.
|
DPI
|
dpi
|
72
|
Barcode image resolution in dpi.
|
Orientation
|
orientation
|
Orientation.Degree0
|
Barcode rotation angle.
|
BarCodeWidth
|
barcode-width
|
0
|
Whole barcode width.
|
BarCodeHeight
|
barcode-height
|
0
|
Whole barcode height.
|
2D / Matrix Group Barcode Properties
|
GroupEnabled
|
group-enabled
|
false
|
Set to enable Data Matrix, PDF417, or QR Code group function.
|
GroupItemCount
|
group-item-count
|
0
|
Data Matrix, PDF417, or QR Code group count.
|
GroupItemId
|
group-item-id
|
0
|
Data Matrix, PDF417, or QR Code group item id.
|
GroupId
|
group-item-id
|
0
|
Data Matrix, PDF417, or QR Code group item.
|
Data Matrix Specific Settings
|
DataMatrixDataMode
|
data-matrix-data-mode
|
DataMatrixDataMode.Auto
|
Set Data Matrix data encoding mode.
- DataMatrixDataMode.Auto: KeepAutomation will select proper data format according to your encoding value.
- DataMatrixDataMode.ASCII: All ASCII characters, including 0-9, A-Z, a-z and special characters like $ , % + / : * etc.
- DataMatrixDataMode.C40: 0-9, A-Z
- DataMatrixDataMode.Text: 0-9, a-z
- DataMatrixDataMode.X12: 0-9, A-Z, and some punctuation marks.
- DataMatrixDataMode.Edifact: 0-9, A-Z, many punctuation marks
- DataMatrixDataMode.Base256: to encode images, double-byte characters, binary data and 8 bit values.
|
DataMatrixFormatMode
|
data-matrix-format-mode
|
DataMatrixFormatMode.FM_12X12
|
Set Data Matrix format mode, including 24 square and 6 rectangle formats.
|
FNC1
|
fnc1
|
FNC1.None
|
To encode GS1 compatible Data Matrix, you need set value to "FNC1.First"
|
TildeEnabled
|
tilde-enabled
|
false
|
Set TildeEnabled to true, specifying special characters in barcode data.
Support escape '~' for data message
-
1-byte character: ~ddd (character value from 0 ~ 255)
ASCII (with EXT): from ~000 to ~255
For example, ASCII char [GS] is non-printable, and its decimal value is 29. In barcode data, you need use ~029 for char [GS].
- 2-byte character: ~6ddddd (character value from 0 ~ 65535)
- Unicode: from ~600000 to ~665535
- ECI: from ~7000000 to ~7999999
- SJIS: from ~9ddddd (Shift JIS 0x8140 ~ 0x9FFC and 0xE040 ~ 0xEBBF)
|
|
Free Trial DownloadC#/VB Data MatrixFor Web Data MatrixFor Windows Data MatrixFor Reports Data MatrixHow To Start Using C#Using VB.NETData Matrix for .NET PDF417 for .NETQR Code for .NETmoreCodabar for .NETCode 39 for .NETCode 128 for .NETEAN-8 for .NETEAN-13 for .NETEAN 128 for .NETIntelligent Mail for .NETInterleaved 2 of 5 for .NETISBN for .NETITF-14 for .NETRM4SCC for .NETUPC-A for .NETUPC-E for .NETmore
|