- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
VB.NET Data Matrix Generator Size Setting Tutorialsample source code to generate 2D Data Matrix images and adjust barcode size in VB.NET
Data Matrix, also known as Data Matrix ECC200, is great 2-dimensional matrix barcode to store different data up to 2,335 alphanumeric characters. Data Matrix Symbology Structure
Data Matrix VB.NET Generator Size Setting Tutorial
After Data Matrix VB.NET Generator installation, get it ready in VB.NET by placing the following statement: Dim datamatrix As OnBarcode.Barcode. DataMatrix FormatMode
The number of modules of a Data Matrix is controlled by Property FormatMode (Default: Format_10X10) . "FM_10X10" stands for the quantity of modules in X dimension is 10, and that in Y dimension is 10. datamatrix.FormatMode = OnBarcode.Barcode.DataMatrixFormatMode.Format_12X12 UOM
UOM is the controller of size setting unit. Pixel, Cm, and Inch are provided as its options. The default value of UOM is Pixel. For example, type the following statement to select Pixel as the unit of size setting measure: datamatrix.UOM = OnBarcode.Barcode.UnitOfMeasure.PIXEL X
Property X (Type: Float; Default: 1) is used for the module width and height setting. datamatrix.X = 2 BarCodeHeight & BarCodeWidth
Property BarCodeHeight (Type: Float; Default: 0) and Property BarCodeWidth (Type: Float; Default: 0) to set the size of the whole image. datamatrix.BarcodeHeight = 175 AutoResize
When the value of X, BarCodeWidth, and BarCodeHeight conflict with each other, Property AutoResize (Type: bool; Default: False) should be enabled to solve the problem and make the Data Matrix 100% compatible with its symbology specification and ISO 16022. See Data Matrix Barcode Size in VB.NET to know more usage of AutoResize. datamatrix.X = 2 TopMargin, BottomMargin, LeftMargin, & RightMargin
Using Data Matrix VB.NET Generator, a quiet zone with 10X width will be generated automatically at each side of the Data Matrix. When wider quiet zone is needed, you can increase the value of properties LeftMargin (Type: Float; Default: 0) and RightMargin (Type: Float; Default: 0). You can also create margins using TopMargin (Type: Float; Default: 0) and BottomMargin (Type: Float; Default: 0). datamatrix.TopMargin = 10 |