.NET Barcode EAN 13 Generator for .NET, C#, ASP.NET, VB.NET
.NET Barcode offers the most affordable .NET barcode generator for barcode .NET professionals.
.NET EAN-13 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 barcodes in C#.NET Class?
The following C# .NET code illustrates how to generate a EAN-13 barcode in C# class:
using KeepDynamic.Barcode.Generator;
BarCode barcode = new BarCode();
barcode.SymbologyType = SymbologyType.EAN13;
barcode.CodeText = "000123456789";
barcode.Format = ImageFormat.Png;
barcode.drawBarcode("C://barcode-ean13-csharp.png");
barcode.drawBarcode("Graphics object");
barcode.drawBarcode("Stream object");
How to generate EAN-13 barcodes in VB.NET Class?
The following VB.NET code illustrates how to generate EAN-13 barcodes in VB.NET class:
// Create linear barcode object in VB.NET
Dim barcode As KeepDynamic.Barcode.Generator.BarCode
barcode = New KeepDynamic.Barcode.Generator.BarCode()
// Set barcode symbology type to EAN-13 in VB.NET
barcode.SymbologyType = SymbologyType.EAN13;
// Set EAN-13 barcode value in VB.NET
barcode.CodeText = "000123456789"
// Set EAN-13 drawing image format to PNG in VB.NET
barcode.Format = ImageFormat.Png
// Generate EAN-13 barcode & encode to the png image in VB.NET
barcode.drawBarcode("C://barcode-ean13-vbnet.png")
// Generate EAN-13 barcode & print to System.Drawing.Graphics object in VB.NET
barcode.drawBarcode("Graphics object")
// Create EAN-13 barcode & draw to System.IO.Stream object in VB.NET
barcode.drawBarcode("Stream object")
Creating EAN-13 barcodes using .NET Barcode Generator Windows Form Control
To create EAN-13 barcodes in Windows Forms applications, do the following procedures:
- Add KeepDynamic.BarCode.Windows.dll to your C#, VB.NET project reference
- Add KeepDynamic.BarCode.Windows.dll to windows project toolbox
- Drag the BarCodeControl item to your windows forms
Creating EAN-13 barcodes using ASP.NET Barcode Generator ASP.NET Web Form Control
To create EAN-13 barcodes in ASP.NET Web Forms applications, do the following procedures:
- Add KeepDynamic.BarCode.AspNet.dll to your C#, VB.NET project reference
- Add KeepDynamic.BarCode.AspNet.dll to windows project toolbox
- Drag the BarCodeControl item to your ASP.NET Web form pages, in your ASP.NET design view
.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 Barcode Generator supports most common linear (1d) and matrix (2d) bar code standards, including: