Home  >  .NET Barcode Generator Suite  >  .NET Barcode Generation Guide  >  How to Create EAN-13 Barcode in .NET Application
.NET EAN-13 Barcode Generator Library for C# & VB.NET
EAN-13 .NET Barcode Generator Librar offers the most affordable .NET barcode generator for barcode .NET professionals. It supports generating & creating EAN-13 linear barcode images in .NET project, ASP.NET web application and Windows Forms project. Besides, this .NET EAN-13 barcoding library also supports .NET preferred programming languages, like C# and VB.NET.
.NET EAN-13 Barcode Introduction
EAN-13 is also known as European Article Number 13, EAN-13 Supplement 5/Five-digit Add-On, EAN-13 Supplement 2/Two-digit Add-On, EAN-13+5, EAN-13+2, EAN13, EAN13+5, EAN13+2, UPC-13, GTIN-13, GS1-13, EAN/UCC-13.
A European Article Number (EAN) is a barcoding standard which is a superset of the original 12-digit Universal Product Code (UPC) system developed in North America. The EAN-13 barcode is defined by the standards organisation GS1. It is also called a Japanese Article Number (JAN) in Japan. UPC, EAN, and JAN numbers are collectively called Global Trade Item Numbers (GTIN), though they can be expressed in different types of barcodes.
How to Generate EAN-13 Barcode Images in .NET Windows Forms Project?
This .NET EAN-13 barcode generating library can help .NET developers create EAN-13 barcode images in Windows Forms project without using any C# or VB.NET class codes.
  1. Add KeepDynamic.BarCode.Windows.dll to your Windows Forms project reference
  2. Add KeepDynamic.BarCode.Windows.dll to windows project toolbox
  3. Drag & drop the BarCodeControl item from Visual Studio toolbox to your windows forms project
  4. Click generated barcode image, adjust its SymbologyType to EAN13 and enter a 12-digit data string at CodeText in the Properties window
How to Generate & Create EAN-13 Barcode Images in ASP.NET Web Application?
  1. Add KeepDynamic.BarCode.AspNet.dll to your ASP.NET web project reference
  2. Add KeepDynamic.BarCode.AspNet.dll to ASP.NET web project toolbox
  3. Copy "linear.aspx", "linear.aspx.cs" from folder barcode to your ASP.NET project
  4. Drag the BarCodeControl item from toolbox to your ASP.NET Web form pages. Then you will see a barcode image being generated
  5. Select created barcode image, adjust its SymbologyType to EAN13 and enter a 12-digit data string at CodeText in the Properties window
  6. Run your ASP.NET web project and view generated EAN-13 barcode images
How to Generate & Create EAN-13 Barcodes using C#.NET Class?
// generate linear barcode object 
BarCode barcode = new BarCode();

// Set barcode type to EAN13
barcode.SymbologyType = SymbologyType.EAN13;

// Enter 12-digit data string
barcode.CodeText = "123456789123";

// set EAN13 barcode image settings
// Set bar width of EAN13
barcode.X = 2;

// set EAN13 barcode image
barcode.BarCodeWidth = 250;
barcode.BarCodeHeight = 90;

// save generated barcode images to png image file using C#
barcode.drawBarcode("C://kdean13.png");
Here are more free C# code for generating & creating EAN-13 barcode images in .NET applications
How to Generate & Create EAN-13 Barcodes using VB.NET Class?
' generate linear barcode object 
Dim barcode As New BarCode()

' Set barcode type to EAN13
barcode.SymbologyType = SymbologyType.EAN13

' Enter 12-digit data string
barcode.CodeText = "123456789123"

' set EAN13 barcode image settings
' Set bar width of EAN13
barcode.X = 2

' set EAN13 barcode image
barcode.BarCodeWidth = 250
barcode.BarCodeHeight = 90

' save generated barcode images to png image file using VB.NET
barcode.drawBarcode("C://kdean13.png")
Here are more free VB.NET code for generating & creating EAN-13 barcode images in .NET applications
.NET EAN-13 Barcodes Properties

Class Properties HTTP Parameters Default Comments
SymbologyType symbology-type SymbologyType.Code128 Barcode type. Values for EAN-13 are SymbologyType.EAN13, SymbologyType.EAN13_2, SymbologyType.EAN13_5
CodeText code-text "" Barcode value to encode. Valid value is 12 digits, without last checksum digit
EnableChecksum enable-checksum true Checksum for barcode value
SupplementData supplement-data "" Barcode supplementary value to encode. only valid for EAN-8, EAN-13, UPC-A, UPC-E, ISBN, ISSN
SupplementSpace supplement-space 15 Barcode supplementary space between main barcode and supplement barcode. only valid for EAN-8, EAN-13, UPC-A, UPC-E, ISBN, ISSN
GraphicsUnit graphics-unit GraphicsUnit.Pixel BarCode graphics meature for all size related settings. 0: pixel; 1: cm; 2: inch. Default is pixel
X x 2 Width of barcode module (narrow bar), default is 2 pixel
Y y 75 Barcode module height, default is 75 pixel
LeftMargin left-margin 0 Barcode image left margin
RightMargin right-margin 0 Barcode image right margin
TopMargin top-margin 0 Barcode image top margin
BottomMargin bottom-margin 0 Barcode image bottom margin
Resolution resolution 72 Barcode image resolution in dpi
Rotate rotate 0 Barcode rotate angle, valid values: 0, 90, 180, 270
DisplayCodeText display-code-text true If true, display barcode value text, otherwise do not display.
CodeTextFont code-text-font "Arial", Font.PLAIN, 11 Barcode text font style
Format format ImageFormat.Png Image format type. Using System.Drawing.Imaging.ImageFormat

.NET EAN-13 Barcodes Generating Supported Barcode Types