.NET Barcode for WinForms          ASP.NET Barcode          .NET Barcode Reader          Java Barcode          Java Barcode Reader
Avapose > Intelligent Mail Introduction > Intelligent Mail Size Setting > Intelligent Mail Size Setting in C#

Intelligent Mail C# Size Setting

Barcode Generator Size Setting, generate & create Data Matrix in C#, ASP.NET, VB.NET applications

The Intelligent Mail barcode consists of Left Quiet Zone, Vertical Quiet Zone, Encoded data and Right Quiet Zone.

As a result, the symbol width of an Intelligent Mail can be calculated with the formula:


Intelligent Mail




W = 2Q + 129X


W : the symbol width of Intelligent Mail
Q : the width of the quiet zone
X : the width of a module bar (Xmin=0.015 inch)


C# Size Setting

With the formula above, there will be three ways to set the size of an Intelligent Mail image in C#. Here are the methods and respective examples.

Method 1. Setting the X Dimension


Setting in C# generator

Steps:

  • Set the X dimension

  • Set AutoResize to false

  • Adjust other properties


Sample:
IntelligentMail.Data = "12345678901234567890";
IntelligentMail.X = 2;
IntelligentMail.AutoResize = false;
Other properties: default;
The generated Intelligent Mail image is:



Method 2. Setting the Barcode Width


Setting in C# generator

Steps:

  • Set the barcode width

  • Set AutoResize to true

  • Adjust other properties


Sample:
IntelligentMail.BarcodeImageWidth =350;
IntelligentMail.AutoResize = true;
Other properties: default;
The generated Intelligent Mail image is::



According to the formula above, the maximum X dimension is 2 pixel for this Intelligent Mail barcode.

Method 3. Setting both X Dimension and Symbol Width


Setting in C# generator

Steps:

  • Set the X dimension

  • Set the barcode width

  • Set AutoResize to false

  • Adjust other properties


Sample:
IntelligentMail.Symbology = Symbology.Code128Auto;
IntelligentMail.Data = "12345678901234567890";
IntelligentMail.X = 1;
IntelligentMail.BarcodeImageWidth = 230;
IntelligentMail.AutoResize = false;
Other properties: default;
The generated Intelligent Mail image is:


Attention: Please note that once you have set an X dimension, there will always be a minimum barcde width as calculated from the calculation above. Therefore, if the W you have set is less than the minimum value, Avapose Intelligent Mai Generators will reset the barcode width to a minimum value according to the standard. Here is an example:

If you set in C# Intelligent Mail generator:
Intelligent Mail.X=3;
Intelligent Mail.W=400;
Intelligent Mail; Data
="12345678901234567890";
The rest of barcode settings are in default value

According to the formula above,
W = 149X
//X=3pixel,
W min = 149*3
=447pixel

However, the W (400pixel) you have set in C# generator is less than the minimum barcode width (477pixel), so the generator will automatically reset it to 477 pixel according to standard. Here is the generated barcode image:

On the other hand, if you set a barcode width larger than the minimum W calculated by the formula, extra spaces will be added to either side of the quiet zones.


if you set in your C # generator:
Intelligent Mail.X=2;
Intelligent Mail.W=340;
Intelligent Mail;Data
="12345678901234567890";
The rest of barcode settings are in default value.


According to the formula,
W = 149X
//X=2pixel,
W min = 149*2
=298pixel

Now your W setting is 340 pixel, which is larger than the minimum width, so an extra 42 pixel will be added to both side of the quiet zone. Here is the barcode image:

USPS Intelligent Mail barcode size configuration in C# for various barcode solutions