Code 128 C#.NET Integration Tutorial

Generate Code 128, Code 128 a, Code 128 b, Code 128 c Using C#.NET

Barcode for C#
.NET Imaging Component
Home > Barcode in C# > Linear > Code 128
Using Visual C#.NET, graphic Code 128 barcode images could be in variety of .NET applcations. Code 128 could be easily integrated into Server-side applications including Web pages, web forms, Crystal Reports, or SSRS Reports. Window applications including Class Library, Console applications, and extended Office application are supported as well. The generated Code 128 could be compatible with AIM USS Code-128, ISS-Code-128, UCC-128, EAN-128, GS1-128, SCC18, USPS, SISAC, Canada Post, or other Code 128 application standard.
Related .net document control helps: word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint mvc text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C# pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm... annotate pdf: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C# ppt viewer: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
Code 128 is one of the most popular linear barcodes. There is one mandatory check character in each Code 128 symbol. Variations of Code 128 are widely included in a number of industry application standards. GS1-128 is an applications standard defined by GS1, a global logistics organization.
Code 128 in C#.NET - Overview
Code 128 Generation - Sample Code in Visual C# .NET
using RasterEdge.Barcode.Bean;

BarCode code128= new BarCode();

//Set barcode symbology type to Code 128Auto, Code 128A, Code 128B, or Code 128C.
code128. Symbology = Symbology. Code128Auto;

// Set Code 128 encoding valid input: All ASCII characters, including 0-9, A-Z, a-z, special
characters like dash, dollar, percentage, space, point, slash, plus, etc. Length: variable.
code128.CodeToEncode = "Code128Csharp";

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

//Set Code 128 image size

code128.BarcodeUnit = BarcodeUnit.Pixel; // Unit of measure, Pixel, Cm and Inch supported.
code128.DPI = 72; // Code 128 image resolution in DPI.
code128.X = 3; // Code 128 bar module width (X dimention)
code128.Y = 60; // Code 128 bar module height (Y dimention)
code128.LeftMargin = 0; // Image left margin size, minimum value is 10X.
code128.RightMargin = 0; // Image right margin size, minimum value is 10X.
code128.TopMargin = 0; // Code 128 image top margin size
code128.BottomMargin = 0; // Code 128 image bottom margin size
code128.Orientation = Orientation.Degree0;// Orientation, 90, 180, 270 degrees supported.

//Set Code 128 human readable text

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

//Generate Code 128 barcodes in image format GIF

//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();

Other image formats like Png, Bmp, Tiff and Jpeg are available for Code 128 generation in C#.