|
No. 1 Bar Code SDK Provider for Java/.NET/Objective-C Professionals
|
Generating Barcode Data Matrix in .NET is one of the functions in OnBarcode's
.NET Barcode Generators, which supports
creating & printing Data Matrix and 30+ other linear & 2D bar codes for C#, VB.NET & ASP.NET applications.
OnBarcode develops several .NET Barcode Generation components for different .NET development environments:
Barcode Generation in ASP.NET
- Creating barcodes in ASP.NET Web applications
Barcode Generation in Windows Forms
- Printing barcodes in C#, VB.NET Windows Forms applications
Barcode Generation in Reporting Service
- Drawing barcodes in Microsoft Reporting Service 2005 & 2008
Data Matrix 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 Data Matrix Generator encodes:
Generating barcode Data Matrix in C# Class example (C# Source Code to Create Data Matrix barcodes)
DataMatrix datamatrix = new DataMatrix(); datamatrix.Data = "0123456789"; datamatrix.X = 3; // Generate Data Matrix and encode barcode to gif format datamatrix.Format = ImageFormat.Gif; datamatrix.drawBarcode("c#-datamatrix.gif"); // Print Data Matrix to C# Bitmap object Bitmap datamatrixBitmap = datamatrix.drawBarcode();
Generating barcode Data Matrix in VB.NET Class example
Dim datamatrix As OnBarcode.Barcode.DataMatrix datamatrix = New OnBarcode.Barcode.DataMatrix() datamatrix.Data = "0123456789" datamatrix.X = 3 // Generate Data Matrix and encode barcode to png format datamatrix.Format = ImageFormat.Png datamatrix.drawBarcode("vbnet-datamatrix.png") // Print Data Matrix to vb.net Bitmap object Dim datamatrixBitmap As Bitmap datamatrixBitmap = datamatrix.drawBarcode();
Creating barcode Data Matrix in C# Class example
DataMatrix datamatrix = new DataMatrix(); datamatrix.Data = "0123456789"; // Create Data Matrix and encode barcode to Jpeg format datamatrix.Format = ImageFormat.Jpeg; datamatrix.drawBarcode("C://csharp-datamatrix.jpg");
Creating barcode Data Matrix in VB.NET Class example
Dim datamatrix As OnBarcode.Barcode.DataMatrix datamatrix = New OnBarcode.Barcode.DataMatrix() datamatrix.Data = "0123456789" // Create Data Matrix and encode barcode to Jpeg format datamatrix.Format = ImageFormat.Jpeg datamatrix.drawBarcode("C://vbnet-datamatrix.jpg")
To draw & print barcode Data Matrix to C# objects:
public void drawBarcode(Graphics graphics); public void drawBarcode(string filename); public Bitmap drawBarcode(); public void drawBarcode(Stream fileStream);
To draw & print barcode Data Matrix to VB.NET objects:
Public Sub drawBarcode(ByRef graphics As Graphics) Public Sub drawBarcode(ByVal filename As String) Public Function drawBarcode() As Bitmap Public Sub drawBarcode(ByRef fileStream As Stream)
| Category | Class Properties | WebStream Properties | Default | Comments | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic | Data | DATA | "DataMatrix" | value to encode | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data Matrix Special |
ProcessTilde | PROCESS-TILDE | true |
Set the ProcessTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is true.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DataMode | DATA-MODE | DataMatrixDataMode. ASCII (1) |
Set the DataMode property.
Valid values are: DataMatrixDataMode.Auto (0), DataMatrixDataMode.ASCII (1), DataMatrixDataMode.C40 (2), DataMatrixDataMode.Text (3), DataMatrixDataMode.X12 (4), DataMatrixDataMode.Edifact (5), DataMatrixDataMode.Base256 (6), DataMatrixDataMode.Customer (7)
Servlet Parameter: "DataMode". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FormatMode | FORMAT-MODE | DataMatrixFormatMode. Format_10X10 (0) |
Default is DataMatrixFormatMode.Format_10X10 (0). Specifies the Data Matrix Format to use on that symbology. Valid values see class DataMatrixFormatMode.Format_*x*; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FNC1 | FNC1 | FNC1.FNC1_NONE (0) | valid values are:
FNC1.FNC1_NONE (0), FNC1.FNC1_1ST_POS (1), FNC1.FNC1_2ND_POS (2) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ApplicationIndicator | AI | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| StructuredAppend | STRUCTURED-APPEND | false | Set StructuredAppend property to true, then Structured Append is enabled. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SymbolCount | SYMBOLE-COUNT | 0 | Set SymbolCount property to the number of total symbols which make the sequence. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SymbolIndex | SYMBOL-INDEX | 0 | Set SymbolIndex property to the position of current symbol in the secuence (Start with 0). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FileId | FILE-ID | 0 | Set FileId property to be identified to the same file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Size Related | UOM | UOM | UnitOfMeasure.PIXEL (0) | Unit of meature for all size related setting in the library.
Valid values: UnitOfMeasure.PIXEL (0), UnitOfMeasure.CM (1), UnitOfMeasure.INCH (2) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X | X | 3 | barcode module width and height, default is 3 pixel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BarcodeWidth | BARCODE-WIDTH | 0 | barcode image width | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BarcodeHeight | BARCODE-HEIGHT | 0 | barcode image height | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LeftMargin | LEFT-MARGIN | 0 | image left margin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RightMargin | RIGHT-MARGIN | 0 | image right margin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TopMargin | TOP-MARGIN | 0 | image top margin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BottomMargin | BOTTOM-MARGIN | 0 | image bottom margin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Resolution | RESOLUTION | 72 | in DPI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Rotate | ROTATE | Rotate.Rotate0 (0) | valid values:
Rotate.Rotate0 (0), Rotate.Rotate90 (1), Rotate.Rotate180 (2), Rotate.Rotate270 (3) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| In WebStream query string, please use int value for Enums, "true" and "false" for bool. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|