For Using BC.NetBarcodeGenerator.Itf14
Easy to generate ITF-14 and output it to raster image files, Stream, Bitmap, Graphics, and HttpResponse in .NET, C#, VB.NET applications.
It's easy to use BC.NetBarcodeGenerator.Itf14 library to encode and generate ITF-14 barcodes 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 BC.NetBarcodeGenerator.Itf14. And the only thing for integration is to add your project reference to the library dll.
PLEASE NOTE, BC.NetBarcodeGenerator.Itf14 only supports encoding and generating ITF-14 barcodes for .NET applications. For generating all barcode symbologies, we provide BC.NetBarcodeGenerator.All SDK that supports the most popular linear barcodes generation and 2d barcodes generation.
On this page, we provide C# and VB.NET Class coding examples of how to use BC.NetBarcodeGenerator.Itf14 library to create 1d barcode symbology ITF-14 and save barcodes to a local raster image file and Bitmap object. Moreover, you can also output created ITF-14 to Stream, Graphics, and HttpResponse in .NET applications.
In addition to generating ITF-14 in .NET Class, you can also encode and generate ITF-14 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 our free trial package. Please download a free trial to see more.
1. This section shows how to create barcode ITF-14 to a local raster image file on your disk in ASP.NET C# and VB.NET Class. Jpg, Jpeg, Tiff, Png, Bmp, and Gif formats are supported. Please firstly add your ASP.NET project reference to BC.NetBarcodeGeneratorTrial.Itf14.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.Itf14; namespace BCAspNetBarcodeGeneratorDemo { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Itf14 barcode = new Itf14(); barcode.SetType = LinearType.Itf14; barcode.SetData = "0246810121416"; barcode.SetItf14BearerBar = Itf14BearerBar.None; barcode.SetItf14BearerBarX = 1; 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.Itf14 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 Itf14 = New Itf14() barcode.SetType = LinearType.Itf14 barcode.SetData = "0246810121416" barcode.SetItf14BearerBar = Itf14BearerBar.None barcode.SetItf14BearerBarX = 1 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 ITF-14 symbology on it in .NET WinForms application. Please firstly add your .NET WinForms project reference to BC.NetBarcodeGeneratorTrial.Itf14.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.Itf14; namespace BCNetWinBarcodeGeneratorDemo { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Itf14 barcode = new Itf14(); barcode.SetType = LinearType.Itf14; barcode.SetData = "0246810121416"; barcode.SetItf14BearerBar=Itf14BearerBar.None; barcode.SetItf14BearerBarX = 1; 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.Itf14 Public Class BCNetWinBarcodeGeneratorDemo Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Dim barcode As Itf14 = New Itf14() barcode.SetType = LinearType.Itf14 barcode.SetData = "0246810121416" barcode.SetItf14BearerBar = Itf14BearerBar.None barcode.SetItf14BearerBarX = 1 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