.NET EAN 13 Barcode Generator
How to generate, print EAN-13 barcode labels in asp.net, vb.net.


Free C#, VB.NET example source code to create, print EAN 13 barcodes in asp.net mvc, windows, crystal reports.



  • Fully compatible with EAN-13 barcoding specification in GS1 Barcode Standards
  • Add EAN-13 barcode printing capability into .NET development environment
  • Support printing EAN-13 barcode in ASP.NET, WinForms, .NET console application, and more .NET projects
  • Draw EAN-13 images in C#.NET & VB.NET in Microsoft Visual Studio 2005, 2008 & 2010
  • Generate and embed EAN-13 in SQL Server Reporting Services, RDLC and Crystal Reports
  • Allow the customization of EAN-13 size, font, color, resolution, and orientation etc
  • Print and save .NET EAN-13 barcode pictures in Png, Jpeg/Jpg, Gif, Tiff, and Bmp
KA.Barcode Generator for .NET Suite Description
EAN-13 Barcode Maker Component SDK is a barcode function of KA.Barcode Generator for .NET Suite which enables developers to simply integrate and create EAN-13, EAN-13+2, EAN-13+5 images and other 1D & 2D barcode symbologies in .NET projects. This guide will help you draw an EAN-13 image with best quality.
EAN-13 Barcode Introduction
EAN-13 is the standard version of International Article Number (EAN) barcodes which is used globally in shipping and retailing industries.
EAN-13 Encodable Data
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
EAN-13 Data Capacity
  • 13 numeric digits (Please input only 12 digits, for K.A.Barcode automatically add the last check digit for you)
Download EAN-13 Barcode Creator for .NET Suite
Download KA.Barcode for .NET Suite and you can use it to generate standard EAN-13 barcode images in .NET projects. The unzipped trial version contains the following dlls and you can use them to generate barcodes in various projects.
  • KeepAutomation.Barcode.Crystal.dll
  • KeepAutomation.Barcode.RDLC.dll
  • KeepAutomation.Barcode.SSRS2005.dll
  • KeepAutomation.Barcode.SSRS2005CRI.dll
  • KeepAutomation.Barcode.SSRS2008.dll
  • KeepAutomation.Barcode.SSRS2008CRI.dll
  • KeepAutomation.Barcode.Web.dll
  • KeepAutomation.Barcode.Windows.dll
Generate EAN-13 Barcode Using C# or VB.NET Class
Copy C# or VB sample code below to generate EAN-13 barcode image in .NET projects. Before that, "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" should be added to your project reference.
C# Sample code
     BarCode ean13 = new BarCode();
ean13.Symbology = KeepAutomation.Barcode.Symbology.EAN13;
ean13.CodeToEncode = "012345678901";
ean13.generateBarcodeToImageFile("c://ean13-csharp.jpeg");

VB Sample code
     Dim ean13 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

ean13.Symbology = KeepAutomation.Barcode.Symbology.EAN13
ean13.CodeToEncode = "012345678901"
ean13.generateBarcodeToImageFile("c:/ean13-vbnet.jpeg")

Generate EAN-13 Barcode in ASP.NET Project
  1. Open your Visual Studio and create a new ASP.NET project.
  2. Copy "barcode.aspx" and "barcode.aspx.cs" in "barcode" folder to your project folder.
  3. Add "KeepAutomation.Barcode.Web.dll" to your project reference.
  4. Drag and drop "BarCodeControl" in Toolbox to the aspx page where your EAN-13 barcode image is to be generated.
  5. Go to the Properties panel, choose EAN13 barcode type.
  6. Run the project to view your EAN-13 barcode image.
Free to generate EAN-13 in Microsoft Internet Information Services
  1. Switch to the "barcode" folder in the unzipped package and copy it to IIS web application folder.
  2. Newly create a virtual directory (named as "barcode").
  3. Restart your IIS and navigate to "http://YourDomain:port/barcode/barcode.aspx?symbology=15&code-to-encode=012345678901"(symboloy: EAN13=15, EAN13Sup2=16, EAN13Sup5=17).
  4. Use the following image tag to insert barcodes in html or aspx pages:
    <img src="http://YourDomain:port/barcode/barcode.aspx?symbology=15&code-to-encode=012345678901"(symboloy: EAN13=15, EAN13Sup2=16, EAN13Sup5=17)/>
  5. In the above url, you are able to change property settings of the generated EAN-13 barcode image.
Generate EAN-13 Barcode in .NET WinForms
  1. Download the trial package of this barcode generator online and unzip it.
  2. Open your Visual Studio and add KeepAutomation.Barcode.Windows.dll to the Toolbox.
  3. Simply drag and drop the BarCodeControl from the Toolbox into the form.
  4. Change "Symbology" to "EAN13" in Properties window.
  5. An EAN-13 barcode image is generated and you can change its other properties through the Properties window.
Generate EAN-13 Barcode in .NET Reports

A Simple Way to Generate EAN-13 Barcode Image in Crystal Reports
This EAN-13 Barcode Maker SDK also supports generating EAN-13 barcode image in Crystal Reports.
A Simple Way to Generate EAN-13 Barcode Image in RDLC Reports
This EAN-13 Barcode Maker SDK also supports generating EAN-13 barcode image in RDLC Reports.
A Simple Way to Generate EAN-13 Barcode Image in Reporting Services
This EAN-13 Barcode Maker SDK also supports generating EAN-13 barcode image in Reporting Services.
EAN-13 Property Settings
Class Attribute HTTP Attribute Default Value Note
Basic
Symbology symbology Code128Auto Barcode symoblogy type
CodeToEncode code-to-encode "128" Barcode value to encode.

Please provide 12 digits only, and DO NOT include last digit checksum character.

  • Valid Data Scope: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  • Valid Data Format: 12 digits.

    There are totally 13 digits in EAN-13 barcode, first 12 digits are barcode value, and last digit is the checksum digit, which is generated by barcode library automatically.

    Sample: barcode.CodeToEncode = "123456789012"
ChecksumEnabled checksum-enabled false This property is not applied here. Barcode SDK will always add a check character in the last digit (modulo 10).
ImageFormat image-format ImageFormat.Png Barcode encoded image format.
Barcode Size
AutoSizeAdjust auto-size-adjust false If true, barcode X, Y module will be auto-adjusted.
BarcodeUnit barcode-unit BarcodeUnit.Pixel Unit of measure for all size related settings. 0: pixel; 1: inch; 2: cm.
X x 1 Barcode module width (narrow bar).
Y y 50 Linear barcode bar height / 2D barcode module height.
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.
DPI dpi 72 Barcode image resolution in dpi.
Orientation orientation Orientation.Degree0 Barcode rotation angle.
BarCodeWidth barcode-width 0 Whole barcode width.
BarCodeHeight barcode-height 0 Whole barcode height.
Barcode Text Style
DisplayText display-text true Set to true, displaying barcode value text, otherwise do not display.
DisplayChecksum displace-checksum true Set to true, displaying barcode checksum digit, otherwise do not display.
TextFont text-font new Font(" Arial", 10 f, FontStyle.Regular) Barcode text font style.
TextMargin text-margin 6 Margin between barcode and text.
EAN-13 Specific Settings
SupplementCode supplement-code - EAN, UPC, ISBN, or ISSN supplement barcode value to encode.
SupplementHeight supplement-height 0.8f EAN, UPC, ISBN, or ISSN supplement barcode height.
SupplementSpace supplement-space 15 EAN, UPC, ISBN, or ISSN supplement barcode space.
Free Trial DownloadC#/VB EAN-13For Web EAN-13For Windows EAN-13For Reports EAN-13Using C#Using VB.NETData Matrix for .NETPDF417 for .NETQR Code for .NETmoreCodabar for .NETCode 39 for .NETCode 128 for .NETEAN-8 for .NETEAN 128 for .NETIntelligent Mail for .NETInterleaved 2 of 5 for .NETISBN for .NETITF-14 for .NETRM4SCC for .NETUPC-A for .NETUPC-E for .NETmore
KeepAutomation provides complete barcode automation solutions. We recommend the customers use high quality document controls: ASP.NET Document Viewer, ASP.NET MVC Document Viewer, Document Viewer ASP.NET C#, ASP.NET PDF Viewer, ASP.NET Word Viewer, ASP.NET Excel Viewer, ASP.NET PDF Editor, MVC PDF Viewer, ASP.NET Annotate PDF, c# pdf sdk, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from RasterEdge.com.