Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!seismo!uunet!crdgw1!uakari.primate.wisc.edu!samsung!think.com!yale!quasi-eli!cs.yale.edu!sanders-malcolm From: sanders-malcolm@CS.YALE.EDU (SANDERS-MALCOLM) Newsgroups: comp.text.tex Subject: Re: Postal Codes Message-ID: <29029@cs.yale.edu> Date: 23 Feb 91 21:13:06 GMT References: Sender: news@cs.yale.edu Distribution: usa Organization: /homes/ee/sanders/.organization Lines: 46 Nntp-Posting-Host: newt.zoo2.cs.yale.edu In-reply-to: adyer@wyse.com's message of 23 Feb 91 02:08:05 GMT In article adyer@wyse.com (Andrew M. Dyer) writes: > Does anyone know the format of those obnoxious little bar codes used > on letters in the U.S.? Is a description available to the public? (It > had damned well better be...) I would like to modify letter.sty to > print address labels with those codes on them, so I can save that all > important extra penny when mailing things. The postal service encodes zipcodes into barcodes based on the following scheme: Each decimal digit in the barcode is represented by a sequence of 5 bars, 3 of which are short(i) and the remaining two are long(l)---allowing for ten possible combinations which are ordered as shown. digit barcode ----- ------ 1 iiill 2 iilil 3 iilli 4 iliil 5 ilili 6 illii 7 liiil 8 liili 9 lilii 0 lliii A correctly formulated barcode has the form long bar--encoded zip code digits--encoded checksum digit--long bar The checksum digit is chosen so that the sum of all the zip code digits plus the checksum digit is an even multiple of 10. I'm not sure of the acceptable dimensions for these things, but I go by what I see on envelopes that I have received. I know that I remember that someone posted a tex routine for these barcodes a couple of years ago, but I can't for the life of me remember who or when. -Malcolm Sanders Applied Physics Yale University