USPS Intelligent Mail Container Barcode Tutorial

Barcode Information | Tutorials | Examples

This tutorial outlines how to create USPS Intelligent Mail (IMb) Container Barcodes (USPS-B-3215) with IDAutomation’s Code 128 Barcode Fonts, Barcode Label Software and other barcode generation products. This tutorial should be used with the USPS specification for additional formatting and placement specifications.

  1. Determine the data structure, which depends upon the Mailer ID assigned by the USPS:
     6 Digit Mailer ID Structure
     Application IdentifierTwo digits, which is 99
     Type IndicatorThe letter “M”
     Mailer IDThe assigned 6 digit mailer ID
     Serial NumberA 12 digit serial number, padded with leading zeros if less then 12 digits.
     9 Digit Mailer ID Structure
     Application IdentifierTwo digits, which is 99
     Type IndicatorThe letter “M”
     Mailer IDThe assigned 9 digit mailer ID
     Serial NumberA 9 digit serial number, padded with leading zeros if less then 9 digits.
  2. Determine which product to use to generate tray labels. IDAutomation offers easy-to-use Barcode Label Software with VB Script, which is a stand-alone application. Additionally, IDAutomation offers Code 128 Barcode Fonts and Barcode Components, which can be integrated into an existing application or print process.
  3. The data from the chart above are combined to be encoded in the GS1-128 format with an incrementing serial number. In the following VB Script example, ~212 identifies “99” as a two digit AI and L# increments the serial number. In this example, the serial number is starting at 100000000 to eliminate the need to pad leading zeros, which can be problematic.
    “~21299M123456789” & 100000000 + L#
  4. The size of the barcode is adjusted to be within specifications:
    Width: 17 MILS, which is a font size of 20 points.
    Height: 0.75″, which is created with the IDAutomationC128M font.
  5. Ensure ApplyTilde is enabled, which allows ~212 to identify “99” as a two-digit AI. The ~212 is not actually encoded in the barcode. The result must be 21 digits, for example:
    99M123456789100000001
  6. When generating GS1-128 symbols, IDAutomation recommends testing the result with the Barcode  Decoder App which parses out GS1 data to verify proper encoding.

Related Information