KA.Barcode for .NET WinForms
How to Create & Resize EAN-13 in .NET WinForms
Source code to generate, print EAN 13 images using Barcode Generator for .NET WinForms Control
  • Full integration into Microsoft Visual Studio 2005/2008/2010
  • Generating, creating 1D high-quality EAN-13, EAN-13+2, EAN-13+5 in .NET Windows Forms
  • Provide detailed .NET barcode integration, C# barcode creation & Word barcode creation guides for users
  • Programmatically create 1D EAN-13 barcodes with C#.NET, Visula Basic .NET class library
  • Support adjusting EAN-13 bar width & bar height through X & Y dimensions
  • Printing EAN-13 with fixed size by setting barcode width and height
  • Add a two-digit or five-digit suppplement and adjust addon space and height
  • Draw and print barcode .NET, Excel barcode, Java barcode & barcode ASP.NET in .NET IDEs
  • Automatically calculate and add checksum digit for EAN-13 for better data security
  • Support thermal printer to output accurate EAN-13 with low-resolution & high-resolution printers
KA.Barcode Creator for EAN-13 is an outstanding barcode control library API SDK which supports printing, drawing high-quality EAN-13 linear bar code images in .NET Windows applications, Crystal Reports, C#, VB.NET class & console applications.
This page is detailed guide to help developers resize generted EAN-13 in WinForms. For other tutorials, please check the links below:
EAN-13 Size Setting with C#, VB.NET Class in .NET Windows Forms

Install EAN-13 Barcode Creator Component Library into .NET

  1. 1.
  2. 2.
    Add reference: Add "KeepAutomation.Barcode.Windows.dll" to your ASP.NET project reference
  3. 3.
    Add to toolbox: To add EAN-13 BarcodeControl to your ASP.NET toolbox
Copy the C# or VB.NET barcoding syntax to you programs to create, produce Code 128 in .NET WinForms:
using KeepAutomation.Barcode.Bean;
BarCode barcode= new BarCode();
barcode.Symbology= KeepAutomation.Barcode.Symbology.EAN13;
barcode.CodeToEncode = "225484562312"
barcode.generateBarcodeToImageFile("C://ean13-csharp.gif")
Dim ean13 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

barcode.Symbology= KeepAutomation.Barcode.Symbology.EAN13
barcode.CodeToEncode = "225484562312"
barcode.generateBarcodeToImageFile("C://ean13-vb.gif")

Printing EAN-13 in Pixel

KA.Barcode Generator provides three units of measure for EAN-13 generation in .NET WinForms, i.e. Pixel, Cm and Inch. Default value is Pixel. To adjust this unit of measure, copy the demo code below:
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel;
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel
Easy-to-use QR Code Maker Control for VB.NET class, VB.NET Web & Windows projects; C# QR Code, ISBN Word, Data Matrix Java, C# ISBN ....
QR Code Generator for .NET Suite Encodes. Numeric data (digits 0 - 9); Alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other...
View How to generate barcode in C#.NET using ASP.NET? ....
more>

Drawing EAN-13 with Specific Bar Width & Height

Users can adjust EAN-13 bar width by customizing the value of "X" dimension, and bar height through "Y" dimension. Default value is 1 pixel for bar width, and 50 pixels for bar height. Copy the demo code below to adjust.
barcode.X = 2;
barcode.Y = 70;
barcode.X = 2
barcode.Y = 70

Creating EAN-13 with Fixed Barcode Size (Width & Height)

If you want to create an EAN-13 bar code image with a fixed size, you can simply adjust EAN-13 "BarCodeWidth" and "BarCodeHeight" properties. Here's how you can do it:
barcode.BarCodeWidth = 200;
barcode.BarCodeHeight = 75;
barcode.BarCodeWidth = 200
barcode.BarCodeHeight = 75

Adjusting EAN-13 Supplement Bar Height & Space

When generating an EAN-13 image with 2-digit or 5-digit addon, you might want to customize the supplement space and bar height. SupplementSpace controls the space between addon symbol and primary barcode symbol, with the unit of measure being pixel. SupplementHeight is the ratio between the addon bar height and the primary bar height.valid from 0 - 1 inclusive.
barcode.Symbology = Symbology. EAN13Sup2;
barcode.CodeToEncode = "012345678912";
barcode.SupplementCode = "02";
barcode.SupplementHeight = 0.8f;
barcode.SupplementSpace = 15;
barcode.Symbology = Symbology. EAN13Sup2
barcode.CodeToEncode = "012345678912"
barcode.SupplementCode = "02"
barcode.SupplementHeight = 0.8f
barcode.SupplementSpace = 15
EAN 13 Size Setting with Drag & Drop BarcodeControl in .NET WinForms
  1. 1.
    Add .NET WinForms BarCodeControl into Visual Studio .NET Toolbox
  2. 2.
    Drag and drop the BarCodeControl into the Forms to generate a Codabar at default
  3. 3.
    Right click the barcode to select "Properties" and choose"EAN13" in the "Symbology" and input data to encode
  4. 4.
    Set "X" to 2, "Y" to "70", "BarCodeHeight" to 75, and "BarCodeWidth" to 200 pixels
  5. 5.
    Click the generated barcode and the customized EAN-13 is updated