- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
C#. Data Matrix Generator Size Setting Tutorialsample source code to generate 2D Data Matrix images and adjust barcode size in C# .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 Structure
W: the width of Data Matrix image (including quiet zone). Please see BarCodeWidth.Data Matrix Image Height Related Settings H: the height of Data Matrix image (including quiet zone). Please see BarCodeHeight. Setting Data Matrix Barcode Size in C#
C# Data Matrix barcode provides a set of barcode size settings to specify you Data Matrix barcodes. Please download C# barcode component and install, copy those following code to your Visual Studio: DataMatrix barcode = new DataMatrix();Modify your Data Matrix barcodes by setting those following properties: UOM
UOM is short for Unit of Measure, which is the unit of meature for all size related settings in the library. C# Data Matrix barcode provides 3 options: Pixel, Cm, and Inch. The default is Pixel. barcode.UOM = UnitOfMeasure.PIXEL; Data Matrix Format Mode
DataMatrixFormatMode is the different size of Data Matrix. C# Data Matrix barcode provides 30 types version: 24 square ones with sizes from 10x10 to 144x144 (even values only) not including quiet zones; and 6 rectangular ones with sizes from 8x18 to 16x48 not including quiet zones. The default in C# Data Matrix barcode is DataMatrixFormatMode.Format_10X10. barcode.DataMatrixVersion = DataMatrixVersion.Format_144X144; Barcode Width & Height
BarcodeWidth is the Data Matrix barcode image width. The default in C# Data Matrix barcode is 0 (float). barcode.BarcodeWidth = 0;Notice: if your setting is smaller than the barcode required minimum width and height, the library will automatically reset to barcode minimum width. Or you may enable AutoResize to automatically resize your Data Matrix barcode image. Barcode Margin
BarcodeMargin is the white zone around the Data Matrix symbol. C# Data Matrix barcode provides 4 options: Left Margin, Right Margin, Top Margin and Bottom Margin. The default of these four margins are 0 (float). barcode.TopMargin = 3; X
X is the width and height of barcode bar module. The default in C# Data Matrix barcode is 2 (float). barcode.X = 3; |