VB.NET Code 93 Generator Size Setting Tutorial
sample source code to generate linear Code 93 images and adjust barcode size in VB.NET
- Generate high quality Code 93 barcode image in or via VB.NET IDEs
- Capable to encoded lowercase letters as data characters in Code 93 Extension
- Easy to set the width of wide bars and narrow bars
- Set the space between data characters basing on width of narrow bars
- Supported image formats include Gif, Tiff, BMP, PNG, and Jpeg
- Provide option to add mod 43 checksum in Code 93
- Calculate the value of mode 43 automatically once checksum is used
Code 93, also known as ANSI/AIM Code 93, ANSI/AIM Code 93, Uniform Symbology Specification Code 93, provides a higher density and data security enhancement to Code 39.
How to generate, print barcode using .NET, Java sdk library control with example project source code free download:
Code 93 Symbology Structure
W: the width of the whole Code 93 barcode image, controlled by property BarCodeWidth
X (X ≥ 1 pixel): the width of Code 93 narrow bar, controlled by property X
C: the number of encoded Code 93 data characters, including module 43 check character if used; related to property Data
Q (Q ≥ 10X): the width of the quiet zone, related to property LeftMargin & RightMargin
More information about Code 93 barcode settings in VB.NET Barcode Generator,please see:
Code 93 VB.NET Generator Size Setting Tutorial
After Code 93 VB.NET Generator installation, get it ready in VB.NET by placing the following statement:
Dim code93 As OnBarcode.Barcode.Linear
code93 = New OnBarcode.Barcode.Linear
code93.Type = OnBarcode.Barcode.BarcodeType.CODE93
If any lowercase letter ("a" through "z") is to be encoded in Code 93, you have to change above statement into:
Dim code93 As OnBarcode.Barcode.Linear
code93 = New OnBarcode.Barcode.Linear
code93.Type = OnBarcode.Barcode.BarcodeType.CODE93EX
Lowercase letter "a" through "z" is not encodable in Code 93, while it could be encoded by Code 93 Extension.
N
As there are wide bars and narrow bars in Code 93. Property N (Type: Float; Default: 2) is used to to set the wider bars in Code 93. The value of Property N represents the ratio of wide bars to narrow bars, which ranges from 2.0 to 3.0.
Sample usage:
code93.N= 2.5
I
The width of spaces between characters in Code 93 is defined by Property I (Float; Default: 1).
Sample usage:
code93.X = 1
code93.I = 2
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:
code93.UOM = OnBarcode.Barcode.UnitOfMeasure.PIXEL
X & Y
Property X (Type: Float; Default: 1) and Property Y (Type: Float; Default: 60) are used in Code 93 barcode symbol size setting. X is for the module width setting, and Y controls the height of the bar.
Sample usage:
code93.X = 2
code93.Y = 70
BarCodeHeight & BarCodeWidth
Property BarCodeHeight (Type: Float; Default: 0) and Property BarCodeWidth (Type: Float; Default: 0) to set the size of the whole image.
Sample usage:
code93.BarcodeHeight = 60
code93.BarcodeWidth = 175
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 93 100% compatible with its symbology specification. See Code 93 Barcode Size in VB.NET to know more usage of AutoResize.
Sample usage:
code93.X = 2
code93.BarcodeHeight = 60
code93.AutoResize = True
TopMargin, BottomMargin, LeftMargin, & RightMargin
Using Code 93 VB.NET Generator, a quiet zone with 10X width will be generated automatically at each side of the Code 93. 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).
Sample usage:
code93.TopMargin = 10
code93.BottomMargin = 10
code93.LeftMargin = 10
code93.RightMargin = 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 93 bar code and the human readable text below the barcode.
Sample usage:
code93.TextMargin = 10