For Using BC.NetBarcodeGenerator.Ean13
Generate EAN 13 barcode to raster image files, Stream, Bitmap, Graphics, and HttpResponse in .NET, C#, VB.NET applications.
BC.NetBarcodeGenerator.Ean13 is a robust .NET barcode generator for EAN 13 barcode symbology. It's easy to use this .NET EAN 13 barcode generator to create and generate EAN 13 barcode in your .NET/C#/VB.NET Class, Console Application, .NET Windows Forms, and ASP.NET web projects. Please firstly download and get the free trial library of our .NET EAN 13 barcode generator (BC.NetBarcodeGenerator.Ean13). And the only thing for integration is to add your C#/VB.NETproject reference to our .NET EAN 13 barcode generator library dll.
PLEASE NOTE, our .NET EAN 13 barcode generator library (BC.NetBarcodeGenerator.Ean13) only supports 1d/linear barcode EAN-13 generation in .NET applications. For all barcode symbologies, we provide BC.NetBarcodeGenerator.All and it supports the most popular linear barcodes and 2d barcodes.
On this page, you will see C# and VB.NET Class coding examples of how to use BC.NetBarcodeGenerator.Ean13 library to generate EAN 13 barcode and save EAN-13 barcode to a local raster image file and Bitmap object. In addition, you can also create and save EAN 13 barcodes to Stream, Graphics, and HttpResponse in .NET applications.
In addition to generating barcodes in .NET Class, you can also generate EAN-13 barcodes in .NET Windows Forms, ASP.NET Web Forms, and IIS applications in other ways. Please click to see details. Moreover, ASP.NET web project and .NET Windows Forms project demos are included in the free trial package of our .NET EAN 13 barcode generator. Please download a free trial to see more.
1. This section shows how to generate EAN 13 barcode to a local raster image file on your disk in ASP.NET C# and VB.NET Class. Our .NET EAN 13 barcode generator supports Jpg, Jpeg, Tiff, Png, Bmp, and Gif formats. Please firstly add your ASP.NET project reference to BC.NetBarcodeGeneratorTrial.Ean13.dll.
using System; using System.Drawing; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BC.AspNetBarcodeGeneratorTrial.Ean13; namespace BCAspNetBarcodeGeneratorDemo { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Ean13 barcode = new Ean13(); barcode.SetType = LinearType.Ean13; barcode.SetData = "246810013579"; barcode.SetUOM = UnitofMeasurement.Pixel; barcode.SetRotation = Rotation.RotateDown; barcode.SetColor = System.Drawing.Color.DeepPink; barcode.SetFontColor = System.Drawing.Color.Chocolate; barcode.SetFont = new Font("Arial", 10f, FontStyle.Bold); barcode.SetTextVisible = true; barcode.SetDPI = 96; barcode.SetLeftSpace = 5; barcode.SetRightSpace = 5; barcode.SetTopSpace = 5; barcode.SetBottomSpace = 5; barcode.SetWidth = 300; barcode.SetHeight = 100; barcode.SetX = 1; barcode.SetY = 80; barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png; barcode.GenerateBarcode("F://test.png"); //In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array. } } }
Imports System Imports System.Drawing Imports System.Collections.Generic Imports System.Linq Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports BC.AspNetBarcodeGeneratorTrial.Ean13 Public Partial Class _Default Inherits Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Dim barcode As Ean13 = New Ean13() barcode.SetType = LinearType.Ean13 barcode.SetData = "246810013579" barcode.SetUOM = UnitofMeasurement.Pixel barcode.SetRotation = Rotation.RotateDown barcode.SetColor = System.Drawing.Color.DeepPink barcode.SetFontColor = System.Drawing.Color.Chocolate barcode.SetFont = New Font("Arial", 10F, FontStyle.Bold) barcode.SetTextVisible = True barcode.SetDPI = 96 barcode.SetLeftSpace = 5 barcode.SetRightSpace = 5 barcode.SetTopSpace = 5 barcode.SetBottomSpace = 5 barcode.SetWidth = 300 barcode.SetHeight = 100 barcode.SetX = 1 barcode.SetY = 80 barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png barcode.GenerateBarcode("F://test.png") ‘In addition to String, you can also output barcode to a Bitmap object, Stream object, Graphics object, HttpResponse object or byte array. End Sub End Class
2. These .NET Class coding examples show how to load an image and generate EAN-13 barcode symbology on it in .NET WinForms application. Please firstly add your .NET WinForms project reference to our .NET EAN 13 barcode generator library, BC.NetBarcodeGeneratorTrial.Ean13.dll. All barcodes properties reference is provided here.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using BC.NetWinBarcodeGeneratorTrial.Ean13; namespace BCNetWinBarcodeGeneratorDemo { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Ean13 barcode = new Ean13(); barcode.SetType = LinearType.Ean13; barcode.SetData = "246810013579"; barcode.SetUOM = UnitofMeasurement.Pixel; barcode.SetRotation = Rotation.RotateDown; barcode.SetColor = System.Drawing.Color.DeepPink; barcode.SetFontColor = System.Drawing.Color.Chocolate; barcode.SetFont = new Font("Arial", 10f, FontStyle.Bold); barcode.SetTextVisible = true; barcode.SetDPI = 96; barcode.SetLeftSpace = 5; barcode.SetRightSpace = 5; barcode.SetTopSpace = 5; barcode.SetBottomSpace = 5; barcode.SetWidth = 300; barcode.SetHeight = 100; barcode.SetX = 1; barcode.SetY = 80; barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png; Image image = barcode.GenerateBarcode(); pictureBox1.Image = image; //In addition to Bitmap object, you can also output barcode to a String, Stream object, Graphics object or byte array. } private void Form1_Load(object sender, EventArgs e) { } } }
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Linq Imports System.Text Imports System.Windows.Forms Imports BC.NetWinBarcodeGeneratorTrial.Ean13 Public Class BCNetWinBarcodeGeneratorDemo Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Dim barcode As Ean13 = New Ean13() barcode.SetType = LinearType.Ean13 barcode.SetData = "246810013579" barcode.SetUOM = UnitofMeasurement.Pixel barcode.SetRotation = Rotation.RotateDown barcode.SetColor = System.Drawing.Color.DeepPink barcode.SetFontColor = System.Drawing.Color.Chocolate barcode.SetFont = New Font("Arial", 10F, FontStyle.Bold) barcode.SetTextVisible = True barcode.SetDPI = 96 barcode.SetLeftSpace = 5 barcode.SetRightSpace = 5 barcode.SetTopSpace = 5 barcode.SetBottomSpace = 5 barcode.SetWidth = 300 barcode.SetHeight = 100 barcode.SetX = 1 barcode.SetY = 80 barcode.SetImageFormat = System.Drawing.Imaging.ImageFormat.Png Dim image As Image = barcode.GenerateBarcode() pictureBox1.Image = image ‘In addition to Bitmap object, you can also output barcode to a String, Stream object, Graphics object or byte array. End Sub End Class
Our .NET EAN 13 barcode generator library is used by customers from all over the world. You can search online and find our .NET EAN 13 barcode generator library easily. Simply search online with ean 13 barcode generator, ean 13 barcode generator c#, ean 13 barcode generator vb.net, asp.net ean 13 barcode generator, .net barcode generator ean 13, asp.net barcode generator ean 13, c# barcode generator ean 13, vb.net barcode generator ean 13 barcode, generate ean 13 barcode c# web application, c# generate ean 13 barcode, generate ean 13 barcode vb.net, .net barcode generator ean13, c# barcode generator ean13, ean13 generator .net windows application, ean 13 generator c# windows application, create ean 13 barcode vb.net, c# create ean 13 barcode, ean 13 barcode generator c#, ean creator .net windows application, ean generator .net windows application, c# ean 13 barcode generator, .net ean-13 generator c# web application, ean-13 barcode font, and generate ean 13 code c# web application.