BizCode Barcode Generator for ASP.NET
The most professional barcode solutions for Microsoft ASP.NET
Quick Overviews
  • Barcode creating class library
  • Support ASP.NET IDEs & IIS
  • Easy to use & integrate
  • Dynamic barcodes support
  • High-usability controls provided
How to Set EAN-128 Size in ASP.NET
ASP.NET EAN-128/GS1-128 Barcode Generating SDK is a great generating control to make EAN-128/GS1-128 barcodes in ASP.NET and IIS with advanced barcode creation and printing features.
This document explains how to set EAN-128/GS1-128 barcode image in ASP.NET, IIS and other tutorials of EAN-128/GS1-128 data encoding and size setting:
EAN-128/GS1-128 Size Related Properties

Encoded Characters

Barcode Generator for ASP.NET provides Code class for users to encode EAN-128/GS1-128 barcode. The length of encoded characters is one of factors that have influence of EAN-128/GS1-128 barcode size.

Barcode Unit

Barcode Generator for ASP.NET provides BarcodeUnit class for users, if they want to choose Pixel, Inch or Cm as the unit measurement for EAN-128/GS1-128 barcode size.

Quiet Margin

Barcode Generator for ASP.NET provides QuietMargin class for users, if they want to adjust quiet margins of top, bottom, right and left surrounding generate EAN-128/GS1-128 barcode images.

Bar Width & Height

Barcode Generator for ASP.NET provides BarWidth and BarHeight class for users, if they want to adjust generated EAN-128/GS1-128 barcode symbol size through controlling the width and height of each bar.

Barcode Width & Height

Barcode Generator for ASP.NET provides BarcodeWidth and BarcodeHeight class for users to, if they want to control the width and height of the whole EAN-128/GS1-128 barcode size, including barcode symbol image, encoded characters and quiet margins.
Customize EAN-128/GS1-128 Barcode Sizes in ASP.NET & IIS
Be sure that you have installed those following programs onto your computers:
  • Microsoft .NET Framework 2.0/3.0/4.0
  • Microsoft Visual Studio 2005/2008/2010 (Express, Professional & Standard Edition)
  • Microsoft Internet Information Service (IIS)
  • Barcode Generator for ASP.NET installed
Customize EAN-128/GS1-128 Barcode Images in ASP.NET Web Forms Using BarcodeControl
  1. Add ASP.NE Barcode Control onto your .NET Visual Studio Toolbox;
  2. Drag and drop the WebLinearBarcode control into the Forms;
  3. Run the website and you will see a barcode image generated;
  4. Go to Address bar and change your URL with following one:
    http://localhost/br_barcode/linear.aspx?code=(01)23456789&symbology=11&bar-width=3&bar-height=75&barcode-width=450&barcode-height=100&top-margin=2&bottom-margin=2&right-margin=5&left-margin=5;
  5. Then a EAN-128/GS1-128 with customized image occurs.
Customize EAN-128/GS1-128 Barcode Sizes in ASP.NET Using C#, VB.NET Class
using BusinessRefinery.Barcode;

Linear barcode = new Linear();
barcode.Symbology = Symbology.EAN128;
barcode.Code = "(01)2";

// Change EAN-128/GS1-128 barcode unit measuirement in Pixel, Inch and Cm
barcode.BarcodeUnit = BarcodeUnit.PIXEL;

// Specify EAN-128/GS1-128 barcode width & height
barcode.BarcodeHeight = 100;
barcode.BarcodeWidth = 500;

barcode.BarHeight = 75;
barcode.BarWidth = 3;

// Control EAN-128/GS1-128 barcode top margin, bottom margin,
right margin and left margin size

barcode.BottomMargin = 7;
barcode.TopMargin = 7;
barcode.LeftMargin = 5;
barcode.RightMargin = 5;
barcode.drawBarcode2SizeFile("c:/ean-128-csharp.gif");
Dim barcode As BusinessRefinery.Barcode.Linear = 
New BusinessRefinery.Barcode.Linear()
barcode.Symbology = BusinessRefinery.Barcode.Symbology.EAN128
barcode.Code = "(01)23456789"

' Change EAN-128/GS1-128 barcode unit measuirement in Pixel, Inch and Cm
barcode.BarcodeUnit = BarcodeUnit.PIXEL

' Specify EAN-128/GS1-128 barcode width & height
barcode.BarcodeHeight = 100
barcode.BarcodeWidth = 500

barcode.BarHeight = 75
barcode.BarWidth = 3

' Control EAN-128/GS1-128 barcode top margin, bottom margin,
right margin and left margin size

barcode.BottomMargin = 7
barcode.TopMargin = 7
barcode.LeftMargin = 5
barcode.RightMargin = 5
barcode.drawBarcode2SizeFile("c:/ean-128-vb-net.gif")
Customize Code Barcode Sizes in Internet Information Service (IIS)
  1. Download Barcode Generator for ASP.NET and unzip;
  2. Copy the whole barcode fold and contents into IIS and create a new virtual directory called "br_barcode";
  3. Restart IIS, navigate to
    http://localhost/br_barcode/linear.aspx?code=(01)23456789&symbology=11&bar-width=3&bar-height=75&barcode-width=450&barcode-height=100&top-margin=2&bottom-margin=2&right-margin=5&left-margin=5;
  4. Then a EAN-128/GS1-128 with customized size occurs.