Create EAN/JAN 8 Barcode in C# (.NET)

EAN 8, EAN 8 Supplement2 and EAN 8 Supplement5 barcodes can be generated using the DynamicPDF Generator or DynamicBarcode Creator products.

How to Create EAN 8 using DynamicBarcode Creator(C#)

Below are steps and sample code to create EAN 8 barcode image using the DynamicBarcode Creator product.

Steps for creating EAN 8 barcode

  1. Create a Ean8 object and set the necessary Parameters.
  2. Draw the barcode to PNG file.

Sample code - C#

Ean8 barcode = new Ean8("12345670");
barcode.Draw("Ean8.png", 300, ImageFormat.Png);  

How to Create EAN 8 Supplement2 using DynamicBarcode Creator(C#)

Below are steps and sample code to create EAN 8 Supplement2 barcode image using the DynamicBarcode Creator product.

Steps for creating EAN 8 Supplement2 barcode

  1. Create a Ean8Supplement2 object and set the necessary Parameters.
  2. Draw the barcode to PNG file.

Sample code - C#

Ean8Supplement2 barcode = new Ean8Supplement2("12345670","12");
barcode.Draw("Ean8Supplement2.png", 300, ImageFormat.Png);  

How to Create EAN 8 Supplement5 using DynamicBarcode Creator(C#)

Below are steps and sample code to create EAN 8 Supplement5 barcode image using the DynamicBarcode Creator product.

Steps for creating EAN 8 Supplement5 barcode

  1. Create a Ean8Supplement5 object and set the necessary Parameters.
  2. Draw the barcode to PNG file.

Sample code - C#

Ean8Supplement5 barcode = new Ean8Supplement5("12345670","12345");
barcode.Draw("Ean8Supplement5 .png", 300, ImageFormat.Png);  

How to add EAN 8 to PDF using DynamicPDF Generator (C#)

Below are steps and sample code to add EAN 8 barcode to a PDF document using the DynamicPDF Generator product.

Steps for adding EAN 8 to a PDF Document using Generator

  1. Create Document object.
  2. Create a Page object and add it to the document.
  3. Create a Ean8 object and set the necessay parameters.
  4. Add the Ean8 to Page.
  5. Save the PDF Document.

Sample code - C#

Document document = new Document();
Page page = new Page();
Ean8 barcode = new Ean8("12345670");
page.Elements.Add(barcode);     
document.Draw(@"C:\Output.pdf");

How to add EAN 8 Supplement2 to PDF using DynamicPDF Generator (C#)

Below are steps and sample code to add EAN 8 Supplement2 barcode to a PDF document using the DynamicPDF Generator product.

Steps for adding EAN 8 Supplement2 to a PDF Document using Generator

  1. Create Document object.
  2. Create a Page object and add it to the document.
  3. Create a Ean8Supplement2 object and set the necessay parameters.
  4. Add the Ean8Supplement2 to Page.
  5. Save the PDF Document.

Sample code - C#

Document document = new Document();
Page page = new Page();
Ean8Supplement2 barcode = new Ean8Supplement2("12345670","12");
page.Elements.Add(barcode);     
document.Draw(@"C:\Output.pdf");

How to add EAN 8 Supplement5 to PDF using DynamicPDF Generator (C#)

Below are steps and sample code to add EAN 8 Supplement5 barcode to a PDF document using the DynamicPDF Generator product.

Steps for adding EAN 8 Supplement5 to a PDF Document using Generator

  1. Create Document object.
  2. Create a Page object and add it to the document.
  3. Create a Ean8Supplement5 object and set the necessay parameters.
  4. Add the Ean8Supplement5 to Page.
  5. Save the PDF Document.

Sample code - C#

Document document = new Document();
Page page = new Page();
Ean8Supplement5 barcode = new Ean8Supplement5("12345670","12345");
page.Elements.Add(barcode);     
document.Draw(@"C:\Output.pdf");

Getting Started

NuGet Package

DynamicPDF Generator is available on NuGet and is part of the ceTe.DynamicPDF.CoreSuite.NET package. The Core Suite package includes Generator, Merger and ReportWriter.

Nuget Logo
NuGet Package ID: ceTe.DynamicPDF.CoreSuite.NET

DynamicBarcode Creator is available on NuGet and is part of the ceTe.DynamicBarcode.Creator.NET package.

Nuget Logo
NuGet Package ID: ceTe.DynamicBarcode.Creator.NET

DynamicBarcode Creator Library is available for WPF is part of the ceTe.DynamicBarcode.Creator.WPF package.

Nuget Logo
NuGet Package ID: ceTe.DynamicBarcode.Creator.WPF

Example Project

An example project showing this functionality can be cloned or viewed from GitHub:

GitHub Logo
Clone or View Example Project on GitHub

DynamicPDF Information

More information can be found here:

Available in other platforms

DynamicPDF Generator is available for the following platforms. Refer to the respective product pages for more details.

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!