- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
VB.NET Code 128 Generator Size Setting Tutorialsample source code to generate linear Code 128 images and adjust barcode size in VB.NET
Code 128, also known as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, is a very capable linear barcode of excellent density, high reliability. Code 128 Symbology Structure
Code 128 VB.NET Generator Size Setting TutorialAfter Code 128 VB.NET Generator installation, get it ready in VB.NET by placing the following statement: Code 128 with auto Code set
Dim code128 As OnBarcode.Barcode.Linear code128 = New OnBarcode.Barcode.Linear code128.Type = OnBarcode.Barcode.BarcodeType.CODE128 Code 128 Code Set A
Dim code128 As OnBarcode.Barcode.Linear Code 128 Code Set B
Dim code128 As OnBarcode.Barcode.Linear Code 128 Code Set C
Dim code128 As OnBarcode.Barcode.Linear 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: code128.UOM = OnBarcode.Barcode.UnitOfMeasure.PIXEL X & Y
Property X (Type: Float; Default: 1) and Property Y (Type: Float; Default: 60) are used in Code 128 barcode symbol size setting. X is for the module width setting, and Y controls the height of the bar. code128.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. code128.BarcodeHeight = 60 AutoResize
When the value of X, Y, BarCodeWidth, and BarCodeHeight conflict with each other, Property AutoResize (Type: bool; Default: False) should be enabled to solve the problem and make the Code 128 100% compatible with its symbology specification and ISO / IEC 15417. See Code 128 Barcode Size in VB.NET to know more usage of AutoResize. code128.X = 2 TopMargin, BottomMargin, LeftMargin, & RightMargin
Using Code 128 VB.NET Generator, a quiet zone with 10X width will be generated automatically at each side of the Code 128. 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). code128.TopMargin = 10 TextMargin
Human readable text are required in almost every linear barcode symbology. Property TextMargin (Type: Float; Default: 6 pixel) is used to set the space between Code 128 bar code and the human readable text below the barcode. code128.TextMargin = 10 |