Barcode Visual C#.NET Integration Guide

How to control barcode generators using Visual C# .NET

Barcode for C#
.NET Imaging Component
Home > Barcode in C#
This guide walks you through the general setup process of barcode generators in Visual C# .NET and the main features of the barcode generators. Barcode generators that support developing in C#.NET include .NET Barcode Winforms Generator, ASP.NET Barcode Generator, and Barcode Font Generator.
Related .net document control helps: image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery open word document in browser: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications pdf viewer control: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET edit pdf text color: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET tiff viewer control: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
This guide includes:
Barcode Generation in C#.NET

C#.NET Barcode Generator Control Setup Process

General Code Sample in C#.NET

BarCode barcodeincsharp = new BarCode();
// e.g.Code128, selelet other barcode by changing Code128 to other
barcodeincsharp.Symbology = Symbology.Code128;
// Input Data
barcodeincsharp.CodeToEncode = "Insert Data in Barcode Here";
// Define Image format
barcodeincsharp.ImageFormat = ImageFormat.Png;
//Define location and file name of the barcode image

Barcode General Size Setting

//Unit Setting; support pixel, cm, and inch
barcodeincsharp.BarcodeUnit = BarcodeUnit.Pixel;
//Size module bar width; float value; defaul 2
barcodeincsharp.X = 1;
//Size module bar height; float value; defaul 75
barcodeincsharp.Y = 50;
//Size barcode image width; float value; defaul 0
barcodeincsharp.BarCodeWidth = 175;
//Size barcode image height; float value; defaul 0
barcodeincsharp.BarCodeHeight = 60;
//Size Top Margin of the barcode; float value; defaul 0
barcodeincsharp.TopMargin = 10;
//Size Bottom Margin of the barcode; float value; defaul 0
barcodeincsharp.BottomMargin = 10;
//Size Left Margin of the barcode; float value; defaul 0
barcodeincsharp.LeftMargin = 10;
//Size Right Margin of the barcode; float value; defaul 0
barcodeincsharp.RightMargin = 10;

Barcode General Image Property Setting

//Set image resolution of the barcode; int value; defaul 96
barcodeincsharp.DPI = 96;
//Set Orientation of symbol in the image; options include 0,90,180,270 degrees
barcodeincsharp.Orientation = Orientation.Degree90;
//Set image format;options include Gif,Png,Tiff,Jpeg,Bmp
barcodeincsharp.ImageFormat = ImageFormat.Png;

Barcode General Data Encodation Setting

//Input Data in the barcode, pay attention to the character set of the barcode you are printing 
barcodeincsharp.CodeToEncode = "Insert Data in Barcode Here";