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.
Quick to Create, Print EAN-13 Barcode using C#
Using BarcodeLib C# Barcode Generator library, you can easily create and print an EAN-13 barcode image using C#.
Create a Linear object to generate 1d barcodes
In property Type, specify the linear barcode format as BarcodeType.EAN13
Enter the EAN-13 code (12 or 13 digits) to property Data
Use the method drawBarcode() to encode and output the EAN-13 barcode to an image file
EAN-13 barcode code includes 13 digits. The first 12 digits are EAN data, and the last digit is the check digit. Using BarcodeLib C# Barcode library,
you can input the complete 13 digits or the frist 12 digits to property Data, and the barcode library will automatically generate the complete EAN-13 barcode images in C# application.
The following C# source code will provide the 12 digits data for property Data.
The following C# source code will provide the EAN-13 13 digits data with wrong check digit (the last digit) for property Data.
The barcode library will always re-calculate the EAN-13 check digit based on the first 12 digits code.
The GS1 standard recommends to use OCR-B font to render EAN-13 barcode text. If your system has installed the OCR-B font, you can try the following
C# code to apply the font style.
Set the property TextFont with the new font name. Note: the C# code below will not modify the EAN-13 font size.
You can print and customize the EAN-13 bar, space module colors and text labe colors through property
BarColor, BackgroundColor and TextFontColor using C# Barcode library.
If you need create high quality EAN-13 barcode images for printing, you'd better create EAN-13 image with high resolution setting through
property Resolution in C# code.
EAN-13 in SVG image format viewed in Chrome web browser
EAN-13 in EPS image format viewed in Adobe Acrobat
Create EAN13 Barcodes in C# ASP.NET Web Project
Add Barcodelib.Barcode.ASP.NET.dll to your web project.
Add Barcodelib.Barcode.ASP.NET.dll to Toolbox.
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.
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.)
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.
Generate EAN13 Barcodes in C# WinForms
Add BarcodeLib.Barcode.WinForms.dll from the downloaded trial package to your WinForms Project.
Add BarcodeLib.Barcode.WinForms.dll to your Visual Studio Toolbox.
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.