USPS Intelligent Mail Barcodes

FormFusion 3.3 and higher supports the ability to print United States Postal Service Intelligent Mail barcodes on your FormFusion templates, which can save you both time and money. The USPS provides mailing discounts to customers who use these barcodes to identify large volumes of outgoing mail. This solution is also known as the USPS OneCode Solution or USPS 4-State Customer barcode (4CB, 4-CB, or USPS4CB).

The barcode is made up of a numeric string that is printed using a barcode font. It is placed on your FormStamp in such a way that it will print on envelopes or on the mailer portion of a form.

Envelope showing the USPS intelligent mail barcode above the mailing address.

The barcode consists of a 20 to 31-digit number containing information identifying the sender, the mail class, and the destination ZIP code. The first half of the barcode is a tracking code composed of the barcode identifier, service type identifier, mailer identifier, and serial number. The second half contains the recipient's routing (ZIP) code.

Code Field Digits Description
Tracking code Barcode Identifier 2 Presort identification number – describes whether or not the mail has already been sorted to some extent.
Chart of USPS Barcode Identifiers.
Tracking code Service Type Identifier 3 Type of mail service (e.g. first class, standard, priority, etc.).
Chart of USPS Service Type Identifiers.
Tracking code Mailer Identifier 6 or 9 Unique number identifying the USPS customer (the sender). Assigned by USPS .
Tracking code Serial number 9 or 6 Sender’s serial or sequence number to track each piece of mail.
  • If the Mailer Identifier is 6 digits, the serial number can use 9.
  • If the Mailer Identifier is 9 digits, the serial number can use 6.
Routing code Delivery point ZIP code 0, 5, 9, or 11 Recipient’s ZIP code.
Total - 20-31 Total barcode length depends on length of routing code


For exact specifications and any updates or changes, please refer to the USPS publications available at https://postalpro.usps.com/mailing/intelligent-mail-barcode.

There are three setup steps required to produce Intelligent Mail barcodes in FormFusion:

  1. Install the barcode font.
  2. Map or create the numeric string to be encoded, based on data in the input file.
  3. Add the variable containing the string to the FormStamp, and encode it as an Intelligent Mail barcode.

Installing the Barcode Font

The Intelligent Mail barcode font can be downloaded from the USPS website linked above, or from the Evisions website. After unzipping the file, refer to the instructions in the \docs\ folder to install the fonts.

As with any other font, it must be installed on both the template developer’s machine and the MAPS server. The list of fonts visible in the drop-downs in FormFusion is populated from the client machine, but the fonts used at run time are those on the server (since MAPS does the actual job processing).

In order to print hard copy output, the MAPS server must be rebooted before any new fonts can be used. PDF output should render correctly without a reboot. Note that it is the actual machine that must be restarted, not just the MAPS service.

Storing the Numeric String into a FormFusion Variable

Depending on the input file, it may be possible to read in some or all of the string from the input file using MapForm variables. Alternatively, use a CaptureForm query to build the input string, incorporating information from MapForm as needed.

The following example builds a CaptureForm query that hard codes most of the USPS options, and uses the recipient’s ZIP code from the input file.

  1. In MapForm, use a floating or offset field to map the ZIP code from the input file.
    The MapForm interface with the zip code highlighted for moving or resizing.
  2. Create a new string SQL variable in Variable Storage.
    CaptureForm variable storage dialog. Here you can name the variable, give it a description, set the data type, type in a sample of what the data should look like, and set the estimated number of characters and rows used in FormStamp.
  3. Create a CaptureForm query that builds the numeric string. Use the :ZIP variable at the end of the string for the Routing Code.
    S Q L builder page for creating a Capture Form query. There is a text box for naming the query, a drop down to set an A D O connection override, radio buttons for setting when the query will execute, a toggle to execute the query during sort, and a toggle to terminate processing on a query error. The S Q L script is at the bottom of the page. The radio buttons that determine time of execution are pre, which executes the query before andy pages have processed; page, which exeutes before each page; post, which executes after all pages are processed; and test, which will not execute on the server.
    Notice how the rest of the string has been entered as static text. If another part of the string (e.g. the serial number) will be using variable input, edit the query to use the additional variables.

Adding the Barcode to FormStamp

  1. Add the :Barcode variable to the FormStamp using a data field. Place it where the barcode should appear on the form.
    A form stamp showing the location of the data field that has been placed where the barcode should go. The barcode, in this instance, is located above the student name field.
  2. Double click the data field to edit its properties. On the Barcode tab, select “USPS Intelligent Mail” in the encoding drop-down.
    The barcode data field properties dialog. Here you can use the drop down to determine the barcode encoding. U S P S Intelligent Mail is selected. The message below the drop down reminds you to have the correct barcode font installed on your computer. There is a link to get the correct barcode font, in case it is not installed.
  3. On the Font tab, choose the “USPSIMBStandard” font.
    The font tab of the data field properties dialog. Here you can select the font from a drop down, determine the font size, font style, font color, lines per inch, and the angle of the text.

    Click OK to exit out of the dialog. Then, save the template.

  4. If preview mode is turned on, the barcode displays as string data on the FormStamp. To see how the barcode actually looks, do a test print template.
    The barcode as it appears in a test print. The barcode appears where the data field was placed (above the mailing address).

Troubleshooting

Nothing is printing where the barcode should appear

If the barcode encoder receives invalid input, it will not print. This feature helps to prevent mail from being sent out with invalid barcodes.

The barcode is printing as a string of letters instead of as a barcode

This indicates that the numeric string has been encoded, but the system is unable to use the barcode font that turns the character string into an actual barcode. Check to make sure that:

The barcode is the wrong size/in the wrong location

Refer to the Font User Guide included in the \docs\ folder of the downloaded USPS fonts zip file for information on the size, location, and surrounding padding required for Intelligent Mail barcodes.

Recipients of PDF files are unable to view the barcodes

By default, PDF files do not include custom fonts in the file. If such a PDF file uses a font that the viewer does not have installed, it chooses a substitute font. To make sure that barcodes display correctly in PDF output, turn on font embedding in the PDF options of the FormDirector.