C#. Postnet Generator Image Setting Tutorial

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


 

C# Postnet Introduction

Postnet, also known as USPS POSTNET Barcode, USPS POSTal Numeric Encoding Technique Barcode, is a delivery point barcodes adopted by United States Postal Services.

C# Postnet Generator supports adjusting the Postnet image settings to generate high quality Postnet images with various platforms in C# development. C# Postnet image setting includes image color, image rotation, image format, image resolution and bar alignment properties. Besides, C# Postnet allows other property settings, such as C# Postnet size setting, C# Postnet data encoding, which are just for your more professional programming.

OnBarcode C# Barcode Generator is designed to generate, create Postnet and other linear & 2d barcodes in Microsoft Word. Here are some more tutorials for C# Postnet 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 Postnet by Adjusting the Image Format in C#.NET

C# Postnet generator is compatible with the image format setting which can supports five types of image format. They are PNG, BMP, JPEG, GIF and TIFF. You may implement the image format property to your C# .NET projects:

Linear postnet = new Linear();

postnet.Type = BarcodeType.POSTNET;

postnet.Data = "123451234";

Generating Postnet in PNG Format

Adjusting PNG format to generate Postnet images in C#.NET Class & console application:

postnet.Format = ImageFormat.Png;

postnet.drawBarcode("c:\Postnet.png");

Creating Postnet with JPEG Format

Setting JEPG format to output Postnet images in C# ASP.NET web projects:

postnet.Format = ImageFormat.Jpeg;

postnet.drawBarcode("c:\Postnet.jpeg");

Drawing Postnet in Gif Format

Customizing GIF format to generate Postnet images in C#.NET Windows Forms programming:

postnet.Format = ImageFormat.Gif;

postnet.drawBarcode("c:\Postnet.gif");

Creating Postnet in Tiff Format

Changing TIFF format to draw Postnet images in SQL Server Reporting Service (SSRS) & Crystal Reports:

postnet.Format = ImageFormat.Tiff;

postnet.drawBarcode("c:\Postnet.tiff");

Creating Postnet in BMP Format

Setting BMP format to create Postnet images in C# class.:

postnet.Format = ImageFormat.Bmp;

postnet.drawBarcode("c:\Postnet.bmp");

 

Rotating Postnet Image for C#.NET Programming

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

Linear postnet = new Linear();

postnet.Type = BarcodeType.POSTNET;

postnet.Data = "121212121";

postnet.Rotate = Rotate.Rotate180;

 

C#.NET Postnet Image Resolution Setting

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

Linear postnet = new Linear();

postnet.Type = BarcodeType.POSTNET;

postnet.Data = "111111222";

postnet.Resolution = 100;

 

C#.NET Postnet Image Color Setting

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

Linear postnet = new Linear();

postnet.Type = BarcodeType.POSTNET;

postnet.Data = "98765";

postnet.BackColor = Color.Black;

postnet.ForeColor = Color.White;

postnet.TextColor = Color.Yellow;

 

C#.NET Postnet Bar Alignment Setting

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

Linear postnet = new Linear();

postnet.Type = BarcodeType.POSTNET;

postnet.Data = "12345678901";

postnet.BarcodeWidth= 300;

postnet.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.