Skip to main content
A newer version of this page is available. .

Intelligent Mail Package

  • 3 minutes to read

Short Description

The Intelligent Mail Package Barcode (IMPB) was developed for the use on mail in the United States. Bar codes of this symbology are used only for packages as opposed to Intelligent Mail bar codes, which are used for postcards, letters, and flats.

This bar code is capable of encoding package tracking information required for more efficient sorting and delivering of packages with the capability of piece-level tracking.

barcode-impb

Bar Code Properties

The type of a bar code control’s Symbology property is IntelligentMailPackageGenerator.

The following property is specific to the IntelligentMailPackageGenerator type.

  • EAN128Generator.FNC1Substitute

    Gets or sets the symbol (or set of symbols) in the bar code’s text that will be replaced with the FNC1 functional character when the bar code’s bars are drawn.

Example

The following code creates an Intelligent Mail Package bar code and specifies its main properties.

using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
// ...
public XRBarCode CreateIntelligentMailPackageBarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to Intelligent Mail Package.
    barCode.Symbology = new IntelligentMailPackageGenerator();

    // Adjust the bar code's main properties.
    barCode.Text = BarCodeText;
    barCode.ShowText = false;
    barCode.WidthF = 300;
    barCode.HeightF = 150f;

    // If the AutoModule property is set to false, uncomment the next line.
    barCode.AutoModule = true;
    //barcode.Module = 3;

    // Adjust the property specific to the bar code type.
    // (Assigned below is the default value.)
    ((IntelligentMailPackageGenerator)barCode.Symbology).FNC1Substitute = "#";

    return barCode;
}

To add the XRBarCode to a report band, handle the report’s XRControl.BeforePrint event.

using System.Drawing.Printing;
// ...

private void XtraReport1_BeforePrint(object sender, PrintEventArgs e) {
    this.Detail.Controls.Add(CreateIntelligentMailPackageBarCode("9212391234567812345671"));
}