How to Generate Code 128 in C# Application

How to Generate Linear Code 128 Barcode Images in C#, ASP.NET, WinForms, Crystal & RDLC
  • Print 1D Code 128Auto, Code 128A, Code 128B and Code 128C in Visual C#.NET class library
  • Create Code 128 barcodes in ASP.NET websites, WinForms, Crystal Reports as well as RDLC Reports
  • Advanced calculation to automatically add Code 128 checksum digit compatible with related specification
  • Offer rich setting options for generated images including size, orientation, resolution, font, etc
  • Support multiple Code 128 barcode image formats, including gif, jpeg, png, tiff and bitmap
  • Provide royalty-free and permanent license for this C# Code 128 barcode library
C# Code 128 Barcode Generator Introduction
KA.Barcode Generator for .NET Suite is the best quality barcode encoder which adds 1D Code 128A, Code 128B, Code 128C barcoding features in .NET. When a Code 128 image is generated in C#, the user-friendly interface allows developers to easily adjust various barcoding settings and produce images with a fixed size.
What Is A Code 128 Barcode
Code 128, also named as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, Code 128 Code Set A, Code 128 Code Set B, Code 128 Code Set C, Code 128A, Code 128B, Code 128C, is a self-checking linear barcode which encodes 128 ISO/IEC 646 characters.
How to Generate Code 128 in ASP.NET Using C#
Developers can also generate linear Code 128 barcode images in ASP.NET Web applications using this barcode creator control SDK. High-quality Code 128A, Code 128B and Code 128C barcodes can be easily created in ASP.NET websites with component drag-and-drop or Visual C# class library and console applications. What also supported is Code 128 generation in Microsoft IIS. For more information, see How to print barcode in Visual C# with ASP.NET web control.
How to Paint Code 128 in .NET Windows Forms Using C#
With this .NET barcode generator class library dll, developers will find it so easy to paint and generate a Code 128 barcode image in Windows Forms applications. You can either drag the control from Toolbox for dynamic barcode generation, or create and save Code 128 graphics to local files with Visual C#.NET class libray. Turn to this page to view more: How to create barcode in .NET WinForms with Visual C#.
How to Print Code 128 in Crystal Reports Using C#
Do you want to print and embed a Code 128 barcode (support code set A, B, and C) in Crystal Reports? This .NET barcode encoder allows you to print multiple Code 128 barcode images in Crystal Reports in no time! All barcode settings are available for adjustment through Visual C# programming. Refer to: How to create barcode in Crystal Reports with Visual C#.
How to Add Code 128 in RDLC Reports Using C#
KeepAutomation barcode generator SDK for .NET Suite is easy to use and it enables developers to add barcoding features into RDLC Reports. With this encoder, you will find it a piece of cake to generate Code 128 barcodes in Visual Studio 2005/ 2008/ 2010 ReportViewer Local Reports (RDLC). Here is the detailed developer guide: How to create barcode in RDLC Reports with C# code.
How to Generate Code 128 in .NET Applications with C#
In order for you to generate high-quality Code 128 barcodes in Class Library or Console Applications, we provide complete Visual C#.NET demo code here. All Code 128 parameters mentioned below can be adjusted as you like. Just make sure you have added this .NET barcode encoder dll to project reference initially.
C# Sample code

BarCode code128 = new BarCode();
code128.Symbology = KeepAutomation.Barcode.Symbology.Code128Auto;
code128.CodeToEncode = "Code128Csharp";

//Apply checksum for Code 128 barcode.
code128.ChecksumEnabled = true;

// Print Code 128 in specified image format like Png, Jpeg, Gif, Tiff, Bmp, etc.
code128.ImageFormat = ImageFormat.Png;

// Display checksum in the Code 128 human-readable text
code128.DisplayChecksum = true;

// Set Code 128 image size

// Code 128 unit of measure, Pixel, Cm and Inch supported.
code128.BarcodeUnit = BarcodeUnit.Pixel;
// Code 128 image resolution in DPI.
code128.DPI = 72;
// Code 128 bar module width (X dimention)
code128.X = 3;
// Code 128 bar module height (Y dimention)
code128.Y = 60;
// Image left margin size, a 10X is automatically added according to
code128.LeftMargin = 0;
// Image left margin size, a 10X is automatically added according to
code128.RightMargin = 0;
// Code 128 image top margin size
code128.TopMargin = 0;
// Code 128 image bottom margin size
code128.BottomMargin = 0;
// Code 128 image orientation, 0, 90, 180, 270 degrees supported.
code128.Orientation = KeepAutomation.Barcode.Orientation.Degree0;

// Set Code 128 human readable text

// Display human readable text
code128.DisplayText = true;
code128.TextFont = new Font("Arial", 10f, FontStyle.Regular);
// Space between barcode and text beneath.
code128.TextMargin = 6;

// Generate Code 128 barcodes in image format PNG

/* Create Code 128 barcodes in Stream object
code128.generateBarcodeToStream(".NET System.IO.Stream Object");

Draw & Print Code 128 barcodes to Graphics object
code128.generateBarcodeToGraphics(".NET System.Drawing.Graphics Object");

Generate Code 128 barcodes & write to byte[]
byte[] barcodeInBytes = code128.generateBarcodeToByteArray();

Generate Code 128 barcodes & encode to System.Drawing.Bitmap object
Bitmap barcodeInBitmap = code128.generateBarcodeToBitmap();
C# - Web Code 128C# - Windows Code 128C# - Crystal Code 128C# - RDLC Code 128C# - Code 128Using C#Using VB.NETData Matrix for C#PDF417 for C#QR Code for C#moreCodabar for C#Code 39 for C#EAN-8 for C#EAN-13 for C#EAN 128 for C#Intelligent Mail for C#Interleaved 2 of 5 for C#ISBN for C#ITF-14 for C#RM4SCC for C#UPC-A for C#UPC-E for C#more
KeepAutomation provides complete barcode automation solutions for add barcode display 2-dimensional, barcode generation capacity api, and barcode mobile applications. We recommend the customers use high quality ASP.NET html5 document viewer, c# pdf sdk, C# merge PDF files, Split PDF in C#, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from