- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
VB.NET UPC-E Generator Size Setting Tutorialsample source code to generate linear UPC-E images and adjust barcode size in VB.NET
UPC-E, also known as Universal Product Code version E, GTIN-12 with lead 0, GS1-12, UCC-12, is the short form representation of a UPC number. ISBN:UPC-E Symbology Structure
UPC-E VB.NET Generator Size Setting TutorialAfter UPC-E VB.NET Generator installation, get it ready in VB.NET by placing the following statement: Dim upce As OnBarcode.Barcode.LinearIf supplement barcode is needed, please select UPCE_2 or UPCE_5 instead of UPCE. Please remember to add string value to property SupData. SupHeight & SupSpace
The height of the supplement barcode is controlled by property SupHeight (Type: Float; Default: 0.8).The space between the main barcode and the supplement barcode is set by property SupSpace (Float; Default: 15 pixels). upce.SupHeight = 0.7 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: upce.UOM = OnBarcode.Barcode.UnitOfMeasure.PIXEL X & Y
Property X (Type: Float; Default: 1) and Property Y (Type: Float; Default: 60) are used in UPC-E barcode symbol size setting. X is for the module width setting (supplement barcode included), and Y controls the height of the bar. upce.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. upce.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 UPC-E 100% compatible with its symbology specification. See UPC-E Barcode Size in VB.NET to know more usage of AutoResize. upce.X = 2 TopMargin, BottomMargin, LeftMargin, & RightMargin
Using UPC-E VB.NET Generator, a quiet zone with 10X width will be generated automatically at each side of the UPC-E. 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). upce.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 UPC-E bar code and the human readable text below the barcode. upce.TextMargin = 10 |