QR Code Image Sample - pqScan.com
C#, VB.NET EAN-8 Creator Encoding EAN-8 Barcode Image in C# and VB.NET Online Demo Download Trial Purchase Now

How to Generate EAN-8 in C# and VB.NET

back to home  >  .NET Barcode Generator SDK  >  Generate Barcodes in C# & VB.NET  >  Generate EAN-8 in C# & VB.NET

C# and VB.NET EAN-8 Creator is one of the generation functions in pqScan Barcode Creator for .NET. Users can integrate the library to any .NET applications. And there is no problem to generate EAN-8 barcode in C# or Visual Basic.NET language.

We also provide the guide articles to other popular Barcode:

Generate and renderEAN8 - C Sharp sample

The C# code guide below shows how to makeEAN-8 barcode using C# in .NET project. Some other ways you may need: creating EAN-8 in .NET WinForms using Barcode Control and drawing EAN-8 in web application using Barcode Control.

using System;
using System.Drawing;
using System.Drawing.Imaging;
usingPQScan.BarcodeCreator;

namespace EAN8GeneratorInCSharp
{
    classProgram
    {
        staticvoid Main(string[] args)
        {

            //Create an instance of PQScan.BarcodeCreator.Barcodeobject.
            Barcode ean8 = new Barcode();
            //Set barcode date to encode
            ean8.Data = "1234567";
            //Set barcode type
            ean8.BarType = BarCodeType.EAN8;
            //Set barcode image width
            ean8.Width = 100;
            //Set barcode image height
            ean8.Height = 80;
            //Set 1d barcode human-readable text to display
            ean8.ShowText = true;           
            //Set barcode image foregroud color
            ean8.BarcodeColor = Color.Black;
            //Set barcode image back ground color
            ean8.BackgroundColor = Color.White;
            //Set barcode image format
            ean8.PictureFormat = ImageFormat.Gif;
            //Save barcode image to file
            ean8.CreateBarcode("ean8-csharp.gif"); 
        }
    }
}

Create and printEAN-8 - Visual Basic sample

The following VB.NET code guides you how to makeEAN-8 barcode image with property settings. The most commonly used properties were listed, you can reset them by your own.

Imports System.Drawing
Imports System.Drawing.Imaging
Imports PQScan.BarcodeCreator

Namespace EAN8GeneratorInVB
    Class Program
        Private Shared Sub Main(args As String())

            'Create an instance of PQScan.BarcodeCreator.Barcode object.
            Dim ean8 As New Barcode()
            'Set barcode date to encode
            ean8.Data = "1234567"
            'Set barcode type
            ean8.BarType = BarCodeType.EAN8
            'Set barcode image width
            ean8.Width = 100
            'Set barcode image height
            ean8.Height = 80
            'Set 1d barcode human-readable text to display
            ean8.ShowText = True
            'Set barcode image foregroud color
            ean8.BarcodeColor = Color.Black
            'Set barcode image back ground color
            ean8.BackgroundColor = Color.White
            'Set barcode image format
            ean8.PictureFormat = ImageFormat.Gif
            'Save barcode image to file
            ean8.CreateBarcode("ean8-vb.gif")
        End Sub
    End Class
End Namespace

generate ean8 in c#/vb.net

.NET Barcode Creator QR Code Creator in C#/VB Data Matrix Creator in C#/VB PDF 417 Creator in C#/VB Aztec Creator in C#/VB EAN 13 Creator in C#/VB UPC A Creator in C#/VB Code 128 Creator in C#/VB Code 39 Creator in C#/VB