Creating concatenated USPS 128 Barcodes

Morovia US Postal Fontware 3 and Code128 Fontware 3 contains code128 fonts that can be used to construct code 128 barcodes for USPS special services such as delivery confirmation and signature confirmation services. The USPS specification is available here.

It is recommended to use typeface MRV Post128 12 points to construct such a barcode string. Font Tools package includes an encoder function, USPS_EAN128, which is designed to encode 20-digit service information, as below:

  1. 2 digit service code

  2. 9 digit customer ID

  3. 8 digit sequential package ID

  4. modulo 10 check digit

The barcode reader outputs 22 digits with leading prefix 91. 91 is UCC/EAN (now GS1) application identifier for USPS special service.

This barcode can be combined with address information using UCC/EAN-128 concatenation. The combined barcode is read as 30 digits, with 420 at the beginning, followed by the 5-digit ZIP code, 91, and 20-digit service information.

How to Create Concatenated USPS Code128 Barcode

This section explains how you create the long 30-digit USPS code128 barcode. Before calling our encode function, you need to prepare the following information:

  • Delivery Address: 5-digit zip code such as 90030

  • Service Information: 20-digit service information, including the last modulo 10 check digit.

Using EAN128Ex function

If you have EAN128Ex function available, use the following format to enter the data: (420)12345(91)12345678901234567890. Leave 420 and 91 intact, and replace the zip code (12345) and service info (12345678901234567890).

Tip

You can find more information on EAN128Ex function at KB10048.

Using EAN128 function

You may also use EAN128 function. In this function, \199 is used to create FNC1 character (required by UCC/EAN-128). The format is like this: 420123456\1999112345678901234567890.

Again, replace 123456 with the zip code and 12345678901234567890 with service info.