| KA.Barcode for .NET Suite How to Generate EAN-8 in .NET Application How to generate & create EAN-8 barcode images in ASP.NET, WinForms, C#, VB.NET class library
- Easily generate EAN-8, EAN-8+2, EAN-8+5 linear barcode symbols in .NET projects
- Print high-quality EAN8 barcodes with Visual C#, VB.NET programming
- Create, paint dynamic EAN-8 in windows applications, ASP.NET web sites, Crystal Reports, SSRS, IIS
- Compatible with Visual Studio 2005 or greater and other .NET development environments
- Full integration with .NET Framework 2.0, 3.0, 3.5 and above
- Allow the adjustment of EAN-8 size through bar width & height, image width & height, space, etc
- Support customization of text font & style of human-readable-text
- Automatically add and generate the checksum digit in EAN-8
KA.Barcode for .NET Suite allows linear EAN-8 barcodes to be generated in various .NET applications. All the generated EAN-8 barcodes are valid for all printers and readers.
how to create barcode image in c#,
barcode generator for excel free,
java barcode api,
barcode scanner for java,
barcode generator project in vb.net,
how to generate barcode in crystal report in vb.net
Moreover, developers can make necessary adjustments for EAN-8 images with C#/VB.NET programming.
barcode generation in vb net,
c# barcode generator wpf,
barcode 128 font c#,
crystal reports barcode font ufl,
c# code 128 reader,
rdlc qr code
EAN-8 Barcode Introduction
EAN-8 is the short version of International Article Number (EAN). It is used globally for the identification of small package in retailing industry. EAN-8 Encodable Character Set
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
EAN-8 Data Length
- 7 digits, excluding the last checksum that is automatically added by KA.Barcode generator
EAN-8 Generation in .NET Applications
Above all, please download KA.Barcode for .NET Suite and unzip. How to Drag & Drop Barcode Control to Generate EAN-8
1. Open your .NET Project with Visual Studio, and right-click "Choose Items..." 2. Browse and select "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" 3. Add "BarCodeControl" to Visual Studio "Toolbox" 4. Drag and drop the "BarCodeControl" from the "Toolbox" onto your forms 5. Select the barcode on the form, switch to the Properties Window, and set "Symbology" property to "EAN8" How to Generate EAN-8 in C#, VB.NET Class Library
Switch to the Visual Studio Solution Explorer window, and add "KeepAutomation.Barcode.Windows.dll" or "KeepAutomation.Barcode.Web.dll" to as reference of the project. Then copy the following C# or VB.NET to where the EAN-8 is generated. using KeepAutomation.Barcode.Bean;
BarCode ean8 = new BarCode(); ean8.Symbology = KeepAutomation.Barcode.Symbology.EAN8; ean8.CodeToEncode = "0123456"; ean8.generateBarcodeToImageFile("c://ean8-csharp.png");
Dim ean8 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
ean8.Symbology = KeepAutomation.Barcode.Symbology.EAN8 ean8.CodeToEncode = "0123456" ean8.generateBarcodeToImageFile("c:/ean8-vbnet.png")
How to Generate EAN-8 with Supplement Barcode
Two types of supplement barcode could be added to EAN-8 for the encoding and display of additional information. They are two-digit supplement barcode (EAN8Sup2) and five-digit supplement barcode (EAN8Sup5). The data, height, and space between EAN-8 and supplement barcode are customizable. Please copy the following code to your project:
Two-digit supplement barcode (EAN8Sup2) using KeepAutomation.Barcode.Bean;
BarCode ean8sup2 = new BarCode(); ean8sup2.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup2; ean8sup2.CodeToEncode = "0123456"; ean8sup2.SupplementCode = "12"; ean8sup2.SupplementHeight = 0.8f; ean8sup2.SupplementSpace = 15; ean8sup2.generateBarcodeToImageFile("c://ean8sup2-csharp.png");
Dim ean8sup2 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
ean8sup2.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup2 ean8sup2.CodeToEncode = "0123456" ean8sup2.SupplementCode = "12" ean8sup2.SupplementHeight = 0.8 ean8sup2.SupplementSpace = 15 ean8sup2.generateBarcodeToImageFile("c:/ean8sup2-vbnet.png")
Five-digit supplement barcode (EAN8Sup5) using KeepAutomation.Barcode.Bean;
BarCode ean8sup5 = new BarCode(); ean8sup5.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup5; ean8sup5.CodeToEncode = "0123456"; ean8sup5.SupplementCode = "12345"; ean8sup5.SupplementHeight = 0.8f; ean8sup5.SupplementSpace = 15; ean8sup5.generateBarcodeToImageFile("c://ean8sup5-csharp.png");
Dim ean8sup5 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode
ean8sup5.Symbology = KeepAutomation.Barcode.Symbology.EAN8Sup5 ean8sup5.CodeToEncode = "0123456" ean8sup5.SupplementCode = "12345" ean8sup5.SupplementHeight = 0.8 ean8sup5.SupplementSpace = 15 ean8sup5.generateBarcodeToImageFile("c:/ean8sup5-vbnet.png")
How to Generate EAN-8 in Microsoft IIS
1. Copy the "barcode" folder from the unzipped folder to IIS web application folder 2. Create a virtual directory named "barcode", then link it to the "barcode" folder in web application folder 3. Testing: Open your web browser, and navigate to "http://localhost/barcode/barcode.aspx?symbology=12&code-to-encode=0123456"(symboloy: EAN8=12, EAN8Sup2=13, EAN8Sup5=14) 4. Adding EAN-8 to web page: insert the following tag onto your web pages <img src="http://localhost/barcode/barcode.aspx?symbology=12&code-to-encode=0123456"/>
How to Generate EAN-8 in .NET Applications with C#.NET Demo Code
Below is some detailed Visual C#.NET sample codings for EAN-8 generation in .NET. You can easily adjust multiple barcode properties like bar width, image width, height, quiet zone, resolution, rotation, human-readable-text font/style, etc.
Furthermore, several methods are provided to make EAN-8 in stream objects, graphics objects as well as image formats.
using KeepAutomation.Barcode.Bean; BarCode ean8= new BarCode(); // Set barcode symbology type to EAN8, EAN8Sup2, EAN8Sup5 ean8. Symbology = KeepAutomation.Barcode.Symbology. EAN8; // Set EAN 8 encoding code value. Valid data: 7 digits numeric digits without checksum. ean8.CodeToEncode = "0123456"; // Apply checksum for EAN 8 barcode. ean8.ChecksumEnabled = true; //Set EAN 8 image size
// Unit of measure, Pixel, Cm and Inch supported. ean8.BarcodeUnit = BarcodeUnit.Pixel; // EAN 8 image resolution in DPI. ean8.DPI = 72; // EAN 8 bar module width (X dimention) ean8.X = 2; // EAN 8 bar module height (Y dimention) ean8.Y = 60; // EAN 8 image left margin size, minimum is 10X. ean8.LeftMargin = 0; // EAN 8 image right margin size, minimum is 10X. ean8.RightMargin = 0; // EAN 8 image top margin size ean8.TopMargin = 0; // EAN 8 image bottom margin size ean8.BottomMargin = 0; // Orientation, 90, 180, 270 degrees supported ean8.Orientation = Orientation.Degree0; // EAN8 supplement code: 2 or 5 digits ean8.SupplementCode = "02"; // Supplement bar height vs bar height ratio. ean8.SupplementHeight = 0.8f; // Space between barcode and supplement barcode ean8.SupplementSpace = 15; //Set EAN 8 human readable text style // Display human readable text ean8.DisplayText = true; ean8.TextFont = new Font ("Arial", 10f, FontStyle. Regular); // Space between barcode and text ean8.TextMargin = 6; // Display checksum in the EAN 8 barcode text ean8. Displaychecksum = true; // Generate EAN 8 barcodes in image GIF format ean8.generateBarcodeToImageFile("barcode-ean8-csharp.gif"); // Create EAN 8 barcodes in Stream object ean8.generateBarcodeToStream(".NET System.IO.Stream Object");
// Draw & Print EAN 8 barcodes to Graphics object ean8.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object"); // Generate EAN 8 barcodes & write to byte[] byte[] barcodeInBytes = ean8.generateBarcodeToByteArray(); // Generate EAN 8 barcodes & encode to System.Drawing.Bitmap object Bitmap barcodeInBitmap = ean8.generateBarcodeToBitmap(); Other image formats including Png, Bmp, Tiff and Jpeg are also available to suit your needs.
|