- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
VB.NET Code 39 Generator Size Setting Tutorialsample source code to generate linear Code 39 images and adjust barcode size in VB.NET
Code 39, also known as Alpha39, Code 3 of 9, Code 3/9, Type 39, USS Code 39, or USD-3, is the first alpha-numeric linear barcode symbology used world-wide. Code 39 Symbology Structure
Code 39 VB.NET Generator Size Setting Tutorial
After Code 39 VB.NET Generator installation, get it ready in VB.NET by placing the following statement: Dim code39 As OnBarcode.Barcode.LinearIf any lowercase letter ("a" through "z") is to be encoded in Code 39, you have to change above statement into: Dim code39 As OnBarcode.Barcode.LinearLowercase letter "a" through "z" is not encodable in Code 39, while it could be encoded by Code 39 Extension. N
As there are wide bars and narrow bars in Code 39. Property N (Type: Float; Default: 2) is used to to set the wider bars in Code 39. The value of Property N represents the ratio of wide bars to narrow bars, which ranges from 2.0 to 3.0. code39.N= 2.5 I
The width of spaces between characters in Code 39 is defined by Property I (Float; Default: 1). code39.X = 1 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: code39.UOM = OnBarcode.Barcode.UnitOfMeasure.PIXEL X & Y
Property X (Type: Float; Default: 1) and Property Y (Type: Float; Default: 60) are used in Code 39 barcode symbol size setting. X is for the module width setting, and Y controls the height of the bar. code39.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. code39.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 39 100% compatible with its symbology specification and ISO 16388. See Code 39 Barcode Size in VB.NET to know more usage of AutoResize. code39.X = 2 TopMargin, BottomMargin, LeftMargin, & RightMargin
Using Code 39 VB.NET Generator, a quiet zone with 10X width will be generated automatically at each side of the Code 39. 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). code39.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 39 bar code and the human readable text below the barcode. code39.TextMargin = 10 |