KA.Barcode for .NET Suite
Guide for Resizing POSTNET Barcodes in VB.NET
Complete VB.NET source code to generate, print POSTNET images and change barcode size with .NET Control

  • Create high print-quality POSTNET barcodes in .NET applications using VB.NET POSTNET Generator Library

  • Easily customize POSTNET barcode width and height, vertical and horizontal margins

  • Effectively set and control the bar module width and height of POSTNET in VB.NET

  • Support adjustment of the space between POSTNET image bars and human-readable text

  • Enable to adjust the short bar to tall bar ratio of POSTNET barcode image

  • Simply draw and print POSTNET with minimum bar module (X)

  • Able to generate and draw a fixed POSTNET image width with maximum bar module

  • Support three unit of measure for POSTNET generation in VB.NET projects, including pixel, cm, and inch

  • Generated POSTNET barcode images conforms to the latest POSTNET specification

vb.net data matrix barcode, qr code scanner using webcam in c#, c# barcode and qr code generator, c# code 128 reader, code 128 checksum c#, rdlc barcode image

POSTNET, is also named as USPS POSTNET Barcode, USPS Postal Numeric Encoding Technique Barcode, Delivery Point Barcode (DPBC), Postnet 3 of 5.

generate barcode image using java, free barcode font for vb.net, barcode scanner in c#, java barcode reader tutorial, integrate barcode scanner in asp.net, gs1 barcode parsing c#

For more information about POSTNET in KA.Barcode Generator for VB.NET, you may refer to POSTNET Image Setting for VB.NET and POSTNET Data Encoding for VB.NET.


POSTNET Generator SDK for VB.NET Related Software

POSTNET Barcode Conponent in C#.NET

POSTNET Barcode Conponent in ASP.NET

POSTNET Barcode Control in Microsoft Word

POSTNET Barcode Conponent in Microsoft Excel



POSTNET Size Setting in VB.NET Generator Overview

Image Width Setting of POSTNET

Below is a chart of POSTNET essential parameters for image setting in VB.NET POSTNET Generator Library.

Parameter Parameter Description Range Related Property
Image Width(W) The width of the POSTNET image W ≥ 83 pixel BarCodeWidth
Module Bar Width (X) The width of the module bar in POSTNET X ≥ 1 pixel X
Left Quiet Zone Width (Q1) The space between the left edge of the image and the leftmost bar; Q1= 10 X + Left Margin Width Q1 ≥ 10X LeftMargin
Right Quiet Zone Width (Q2) The space between the right edge of the image and the rightmost bar; Q2= 10 X + Right Margin Width Q2 ≥ 10X RightMargin

Attention: the number of data characters also has an influence on the barcode width. For more details, please refer to Setting POSTNET Image in Visual Basic .NET Generator.

Image Height Setting of POSTNET

POSTNET barcode image height is decided by these factors, top and bottom margin width, bar height, text height, and the space between image bar and text.

Parameter Parameter Description Range Related Property
Image Height (H) The height of the image H ≥ 70 pixel H
Bar Height (Y) The height of the bar Y ≥ 50 pixel Y
Short Bar Height (SY) The height of POSTNET short bar 0 < S < 1 ShortTallRatio
Top Margin Width The height of the top margin ≥ 0 TopMargin
Bottom Margin Width The height of the bottom margin ≥ 0 BottomMargin
Text Height The height of the human readable text font - Text Font
Text Margin The space between symbol and text ≥ 0 TextMargin


Using VB.NET Generator to Set POSTNET Barcode Size

In the following section, we will talk about how to set and adjust POSTNET barcode image size in .NET projects using Visual Basic.

KeepAutomation VB.NET POSTNET Generator Library provides developers with a full set of properties for POSTNET size setting. Please install POSTNET Barcode Library in VB.NET firstly. Then do as follows:

Copy the following namespace reference code to your Visual Basic .NET projects.

Dim Postnet As KeepAutomation.Barcode.Bean.BarCode

Postnet = New KeepAutomation.Barcode.Bean.BarCode()

Input the following VB code to refer to POSTNET barcode in VB.NET POSTNET Generation Component.

Postnet.Symbology = KeepAutomation.Barcode.Symbology.Postnet

Add the following code and input your target data to be encoded. Also, you can obtain details about data encoding from VB.NET POSTNET data encoding explanation.

Postnet.CodeToEncode = "68645"

BarcodeUnit

BarcodeUnit parameter is designed to set the unit of measure for POSTNET generation in VB.NET class. Before setting the bar width and image size, you should select the unit of measure (Pixel, Cm, and Inch). Our POSTNET Generator SDK for VB.NET set Pixel as the default unit of measure.

Postnet.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel

X

X (Float; Default: 1) parameter is used to adjust bar module width of POSTNET in Visual Basic .NET. And this parameter is customizable.

Postnet.X = 3

Y

Y (Float; Default: 50) parameter is used to set POSTNET bar height in VB .NET class. In our VB.NET POSTNET barcode component, this property is user-defined.

Postnet.Y = 60

ShortTallRatio

ShortTallRatio (Float; Default: 0.4 pixel) is designed to control short to tall bar ratio of POSTNET. And the value of this property should ranges from 0 to 1.

Postnet.ShortTallRatio = 0.3

BarCodeHeight and BarCodeWidth

BarCodeHeight (Float; Default: 0) and BarCodeWidth (Float; Default: 0) are adopted to set the whole POSTNET barcode image width and height.

Postnet.BarCodeWidth = 173

Postnet.BarCodeHeight = 76

Note: If your settings of these two properties conflict with your required bar width or bar height, you can enable AutoResize property. By doing this, our software will reset your POSTNET barcode size automatically and the generated POSTNET is compatible with its barcode specification.

TopMargin, BottomMargin, LeftMargin, and RightMargin

In our VB.NET POSTNET Generator, you can set and adjust the whole image width by adjusting LeftMargin (Float; Default: 0) and RightMargin (Float; Default: 0). Also, the whole image height of POSTNET can be enlarged by setting TopMargin (Float; Default: 0) and BottomMargin (Float; Default: 0).

Postnet.TopMargin = 5

Postnet.BottomMargin = 5

Postnet.LeftMargin = 3

Postnet.RightMargin = 3

TextMargin

TextMargin (Float; Default: 6 pixel) is used to control the space between POSTNET image bar and the human readable text.

Postnet.TextMargin = 7