KA.Barcode Generator for .NET Suite allows developers to easily generate accurate Codabar linear images and other matrix barcodes in Visual C#.NET class library,
ASP.NET webform, windows applications, Crystal Reports, SSRS, etc. KeepAutomation provides flexible setting options and detailed tutorials for Codabar generation in C#.
barcode vb.net code,
c# code to generate barcode,
how to print barcode in asp.net c#,
birt barcode open source,
barcode scanner library java,
barcode in crystal report c#
Codabar is a common linear barcode also named as CodaBar, Code 2 of 7, USS Codabar, 2 of 7 Code.
using KeepAutomation.Barcode.Bean;
//Create BarCode object in C#
BarCode codabar= new BarCode();
//Set barcode symbology type to Codabar
codabar.Symbology = KeepAutomation.Barcode.Symbology. Codabar;
//Set Codabar encoding code value. Valid data: numeric digits 0-9, dash, dollar, slash, point, plus. Length: variable.
codabar.CodeToEncode = "6663";
//Codabar Start & Stop Char
codabar.CodabarStartChar = CodabarStartStopChar.A;
codabar.CodabarStopChar = CodabarStartStopChar.A;
//Set Codabar image size
//Unit of measure, pixel, cm and inch supported.
codabar.BarcodeUnit = BarcodeUnit.Pixel;
//Codabar image resolution in dpi
codabar.DPI = 72;
//Codabar bar module width (X dimention)
codabar.X = 3;
//Codabar bar module height (Y dimention)
codabar.Y = 60;
//Image left margin size, minimum value is 10X.
codabar.LeftMargin = 0;
//Image right margin size, minimum value is 10X.
codabar.RightMargin = 0;
//Codabar image top margin size
codabar.TopMargin = 0;
//Codabar image bottom margin size
codabar.BottomMargin = 0;
//Orientation, 90, 180, 270 degrees supported.
codabar.Orientation = Orientation.Degree0;
//Set Codabar human readable text style
//Display human readable text
codabar.DisplayText = true;
codabar.TextFont = new Font("Arial", 10f, FontStyle.Regular);
//Space between barcode and text
codabar.TextMargin = 6;
//Generate codabar barcodes in image GIF format
codabar.generateBarcodeToImageFile("barcode-codabar-csharp.gif");
//Create Codabar barcodes in Stream object
codabar.generateBarcodeToStream(".NET System.IO.Stream Object");
//Draw & Print Codabar barcodes to Graphics object
codabar.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");
//Generate Codabar barcodes & write to byte[]
byte[] barcodeInBytes = codabar.generateBarcodeToByteArray();
//Generate Codabar barcodes & encode to System.Drawing.Bitmap object
Bitmap barcodeInBitmap = codabar.generateBarcodeToBitmap();
Other image formats including PNG, BMP and JPG are also available to suit your needs.