C#. Code 128 Generator Image Setting Tutorial

sample source code to generate linear Code 128 in png, jpeg, etc. image formats in C# .NET


 

C# Code 128 Introduction

Code 128, also known as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, is a very capable linear barcode of excellent density, high reliability.

C# Code 128 Generator supports 5 types of Code 128 generator, which are C# Code 128 Generator for Windows Forms, C# Code 128 Generator for ASP.NET , C# Code 128 Generator for SQL Server Reporting Services (SSRS), C# Code 128 Generator for Crystal Reports, C# Code 128 Generator for Windows Azure. All of these Code 128 generators allow adjusting the Code 128 image settings.

OnBarcode C# Barcode Generator is designed to generate, create Code 128 and other linear & 2d barcodes in Microsoft Word. Here are some more tutorials for C# Code 128 generation concerning data encoding and size setting.




How to generate, print barcode using .NET, Java sdk library control with example project source code free download:


 

Generating Code 128 by Adjusting the Image Format in C#.NET

As referring to the image format, C# .NET Code 128 image format setting property provides 5 image formats to generate high quality Code 128 images in C# projects:

Linear code128 = new Linear();

code128.Type = BarcodeType.CODE128;

code128.Data = "553133572";

Generating Code 128 in PNG Format

You may set the PNG format to generate Code 128 images in C#.NET Class & console application:

code128.Format = ImageFormat.Png;

code128.drawBarcode("c:\Code 128.png");

Creating Code 128 with JPEG Format

You may set the JEPG format to output Code 128 images in C# ASP.NET web projects:

code128.Format = ImageFormat.Jpeg;

code128.drawBarcode("c:\Code 128.jpeg");

Drawing Code 128 in Gif Format

You may set the GIF format to generate Code 128 images in C#.NET Windows Forms programming:

code128.Format = ImageFormat.Gif;

code128.drawBarcode("c:\Code 128.gif");

Creating Code 128 in Tiff Format

You may set the TIFF format to draw Code 128 images in SQL Server Reporting Service (SSRS) & Crystal Reports:

code128.Format = ImageFormat.Tiff;

code128.drawBarcode("c:\Code 128.tiff");

Creating Code 128 in BMP Format

You may set the BMP format to create Code 128 images in C# class.:

Code 128.Format = ImageFormat.Bmp;

Code 128.drawBarcode("c:\Code 128.bmp");

 

Rotating Code 128 Image for C#.NET Programming

C# .NET Code 128 image rotation setting supports rotating the generated Code 128 image with 0, 90, 180, 270 degrees in C# projects:

Linear code128 = new Linear();

code128.Type = BarcodeType.CODE128;

code128.Data = "1234567";

code128.Rotate = Rotate.Rotate90;

 

C#.NET Code 128 Image Resolution Setting

C# .NET Code 128 image resolution setting allows setting the resolution for the created image in C# programming:

Linear code128 = new Linear();

code128.Type = BarcodeType.CODE128;

code128.Data = "1234567";

code128.Resolution = 120;

 

C#.NET Code 128 Image Color Setting

C# .NET Code 128 image color can be easily integrated with changing the text color, background color and bar color when generating Code 128 in C# class:

Linear code128 = new Linear();

code128.Type = BarcodeType. CODE128;

code128.Data = "123486";

code128.BackColor = Color.Black;

code128.ForeColor = Color.White;

code128.TextColor = Color.Yellow;

 

C#.NET Code 128 Bar Alignment Setting

Besides image format, image resolution, image rotation and image color, Code 128 Generator for C# image setting properties can set bar alignment.

Linear code128 = new Linear();

code128.Type = BarcodeType.CODE128;

code128.Data = "123456";

code128.BarcodeWidth=200;

code128.BarAlignment = AlignmentHori.Left;

When the set image width is larger than the minimum image width, Bar Alignment property can set the extra space on the left, center and right side.







OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.