EAN-13 FAQ in VB.NET Barcode Generator SDK

Generate EAN-13, EAN-13+2, EAN-13+5 and adjust data, image, size, properties with VB source code available
Barcode in VB.NET > Linear > EAN-13 FAQ
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Barcode FAQ in VB.NET
EAN-13 barcode component software for VB.NET is a mature and flexible .NET control DLL that supports generating EAN-13 and other linear & 2D barcode as images in various VB.NET projects such as Winforms application, ASP.NET, Crystal Report, class library and console applications using VB.NET coding, free sample and source code is provided.
This article tells about EAN-13 property settings on the following aspects using VB.NET class method with free sample code provided.
  • Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Data Encoding
  • Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Special Settings
  • Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Size Adjustment
  • Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Image Customization
  • Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Solution Project Support
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Data Encoding
Linear EAN-13 Barcode Valid Data in Barcode Library DLL
  • Digit numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 12 digits long with a checksum character which is automatically calculated by Terrek.Barcode for VB.NET
EAN-13 VB.NET Sample Code:
barcode.Symbol = Terrek.Barcode.BarcodeSymbol.EAN13
barcode.BarcodeData = "123456789123"
EAN-13 Human-Readable Text
Human-readable text is flexible to be enabled or disabled with barcode control SDK for VB.NET. Developers may set this property via DisplayData. Type is bool.The default is true.
Once enabled text in barcode image, the text font is adjustable. The font used to display text in barcode image. Type is TextStyle, default is New Font("Arial", 9.0F, FontStyle.Regular). The color & space of text font are adjustable.
EAN-13 VB.NET Sample Code:
barcode.DisplayData = True
barcode.TextStyle = New Font("Arial", 9.0F, FontStyle.Regular)
barcode.TextColor = Color.Black
barcode.TextSpace = 10
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Special Settings
EAN-13 Supplemental Barcode
EAN-13 barcode SDK allows users to add 2 or 5 digits supplemental data to the EAN-13 barcode. Once encode the EAN-13 add-on barcodes, the size related properties needs to be set. Users may add supplemental digits using Symbology property and customize add-on barcode size by adjusting SupplementCode, SupplementHeight, SupplementSpace respectively.
EAN-13+2 VB.NET Sample Code:
barcode.Symbol = Terrek.Barcode.BarcodeSymbol.EAN13_AddOn2
barcode.AddOnData = "12"
barcode.AddOnHeight = 0.7
barcode.AddOnMargin = 8
EAN-13+5 VB.NET Sample Code:
barcode.Symbol = Terrek.Barcode.BarcodeSymbol.EAN13_AddOn5
barcode.AddOnData = "12345"
barcode.AddOnHeight = 0.8
barcode.AddOnMargin = 6
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Size Adjustment
EAN-13 UOM (Unit of Measure)
Set property MeasuringUnit for properties BarWidth, BarHeight, MarginL and MarginT. Valid values are PIXEL, CM and INCH. Default is PIXEL. With this UOM setting, users can control the whole barcode size to a unique type.
EAN-13 VB.NET Sample Code:
barcode.MeasuringUnit = Terrek.Barcode.MeasuringUnit.CM
EAN-13 Module Size
EAN-13 bar size refers to the BarWidth and BarHeight of a module bar. When developers need to create barcodes with a fixed bar width, these two properties need to be implemented. With the ImageResize applied, image width & image height are changed according to the customization of bar width and bar height. The type is float.
EAN-13 VB.NET Sample Code:
barcode.BarWidth = 2
barcode.BarHeight = 100
EAN-13 Image Size
EAN-13 image size refers to the whole barcode image size including image width and image height. If the module size is unknown, you can set the ImageHeight and ImageWidth directly with the applying of ImageResize to true. The generated EAN-13 is 100% compatible with International Standard ISO/IEC 15420.
EAN-13 VB.NET Sample Code:
barcode.ImageWidth = 110
barcode.ImageHeight = 110
EAN-13 Margin Size
Increasing the width of margins around the symbol is one way to enhance the readability of the EAN-13 barcode image. The barcode control library SDK set the left, right, top, and bottom margins separately with float values. The default value is 0.
EAN-13 VB.NET Sample Code:
barcode.MarginL = 4
barcode.MarginR = 4
barcode.MarginT = 4
barcode.MarginB = 4
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Image Customization
EAN-13 Image Format
EAN-13 generated in Visual Basic.NET programs with barcode library generator SDK can be displayed as Gif, Tiff, Bmp, Png, Jpeg and other image formats. Programmers may change the format using BarcodeFormat property.
EAN-13 VB.NET Sample Code:
barcode.BarcodeFormat = System.Drawing.Imaging.ImageFormat.Jpeg
barcode.SaveAsImage("C:\ean13.jpeg")
EAN-13 Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by EAN-13 generator SDK could be managed with DPI and compatible with all printers. Type is int. Default is 96 dpi. Programmers can set resolution with DotsPerInch property.
EAN-13 VB.NET Sample Code:
barcode.DotsPerInch = 120
EAN-13 Image Position
The created EAN-13 is flexible to change the placement in VB.NET projects with source. By customizing the BarAlign properly, the image is presented left, right or center in documents or projects. Default is center. By changing Rotation property, the image can be rotated to 90, 180, and 270 degrees. The default is 0 degree.
EAN-13 VB.NET Sample Code:
barcode.Rotation = Terrek.Barcode.Rotation.Degree180
barcode.BarAlign = Terrek.Barcode.BarAlign.Right
EAN-13 Image Color
It is able to change barcode colors with barcode library software DLL using VB.NET class. Both background color and foreground color are easy to be changed by manipulating ImageColor and BarColor respectively.
EAN-13 VB.NET Sample Code:
barcode.ImageColor = Color.White
barcode.BarColor = Color.Black
Generate Barcode Image Using Visual Basic.NET Class - EAN-13 Supported Projects
Using VB.NET to create EAN-13 with barcode control library DLL, it is entitled that the generated barcode can be used in multiple .NET environments and projects with source code. Tutorial to create & print barcode images using VB.NET.
  • Windows Forms Application (design-time and runtime support)
  • Visual Basic Console Application (runtime support)
  • Visual Basic Class Library (runtime support)
  • Windows Service (runtime support)
  • ASP.NET Applications (design-time and runtime support)
  • Web Service (runtime support)
  • Crystal Report for .NET (runtime support)
  • Reporting Service Applications (design-time and runtime support)