Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcode Generation Guide > C# EAN13 Generator Component for .NET
Download Barcode for .NET Suite Trial

EAN-13 Generator Library for .NET in C# Class

How to Generate Linear EAN13 Barcodes in .NET with C# Programming
  • Highly performance C# EAN-13 Barcode Generator SDK in use for more than 10 years
  • Generate high-quality EAN-13 images with simple C# Class programming
  • Create and Draw EAN-13 barcode in C# .NET WinForms or Web applications
  • Create and encode EAN-13 barcodes to various image formats
  • Easy to install without any activation key or registration code
  • Perfect integration with various .NET development environments, like Microsoft Visual Studio
C# Linear EAN13 Barcode Overview
Linear EAN13 Barcode is widely used in daily products. This barcode type can only encode 12 numeric data and a check digit, but it could store much information like manufacturer code, product information and area code. So with those codes, EAN13 barcode could track product worldwide and this is also why it is used to encode GITN.
Steps to Generate EAN13 Images in C#.NET Class?
The following are detailed steps to create EAN13 barcode in C# .NET Class:
  1. Install our barcode.NET barcode generator components to your project by adding reference.
  2. Install this barcode ASP.NET component to the Toolbox.
  3. Use the following free C# sample codes.
     BarcodeLib. Barcode.Linear ean13 = new BarcodeLib.Barcode.Linear();
ean13.Type = BarcodeLib.Barcode.BarcodeType.EAN13;
ean13.Data = "123456789123";

ean13.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
ean13.BarColor = Color.Blue;
ean13.LeftMargin = 4;
ean13.RightMargin = 4;
ean13.BarWidth = 2;

// More ean13 barcode settings here, like image color, font, human-readable text font etc.

// save barcode image into your system
ean13.drawBarcode("c:/datamatrix.jpeg");

// Encode ean13 barcode & output to byte array
byte[] barcodeInBytes = ean13.drawBarcodeAsBytes();

// Encode ean13 barcode to Graphics object
Graphics graphics = ...;
ean13.drawBarcode(graphics);

// Encode ean13 barcode and output to HttpResponse object
HttpResponse response = ...;
ean13.drawBarcode(response);

// Encode ean13 barcode and output to Stream object
Stream stream = ...;
ean13.drawBarcode(stream);

Above Free EAN13 sample codes are written in Visual C# 2005
Steps to Create EAN13 Barcodes in C# ASP.NET Web Project?
  1. Add Barcodelib.Barcode.ASP.NET.dll to your web project.
  2. Add Barcodelib.Barcode.ASP.NET.dll to Toolbox.
  3. Open the folder barcode in the downloaded trial package and copy files "linear.aspx", "linear.aspx.cs" to the folder where your web project is created.
  4. Drag LinearASPNET from the Toolbox and drop it on the split part of your aspx page. Then you will see a barcode image. (Note: the SDK default barcode image is Code 128.)
  5. Click the produced barcode image, then change barcode type to EAN13 and its data to 12 digits in the Properties Window or generate EAN-13 barcode with the above C# sample codes.
Steps to Generate EAN13 Barcodes in C# WinForms Project?
  1. Add BarcodeLib.Barcode.WinForms.dll from the downloaded trial package to your WinForms Project.
  2. Add BarcodeLib.Barcode.WinForms.dll to your Visual Studio Toolbox.
  3. Drag LinearWinForm to your windows form and you will see a Code 128 barcode image. Click the image and adjust its type to EAN13 in the Properties Window or create this linear barcode with above C# free sample codes.
Barcode Images Supported by C# EAN13 Generator SDK
C# 1D Barcode Generation:
C# 2D Barcode Generation:
Barcode Generator Control for C# - Creates Linear Barcode Images: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, EAN-8, EAN-13, Interleaved 2 of 5, ITF-14 (UPC Shipping Container Symbol), Code 128, EAN 128/GS1 128, MSI Plessey, Intelligent Mail, Planet, Postnet, RM4SCC (British Royal Mail), UPC-A, UPC-E.
Barcode Generator Control for C# - Creates 2D Barcode Images: Data Matrix, PDF 417, QR Code.