Article View: comp.mail.misc
Article #2675postnet bar codes
From: DLV
Date: Thu, 31 Jan 1991 03:12
Date: Thu, 31 Jan 1991 03:12
134 lines
4243 bytes
4243 bytes
Yeah, I guess there's no reason why comp.mail.misc shouldn't be used to discuss
USPS. :)
OK, my experience shows that putting facing identification marks and postnet
codes on envelopes doesn't seem to do anything on local mail, but may speed up
delivery by a day for non-local mail. The downside is, some folks see those bar
codes, assume that the letter is junk mail, and throw it away. :) A couple of
years ago I wrote LaTeX macros for making envelopes with postnet codes and
posted them to TeXHAX. If you use them, you may have to change some things
for your printer, device driver, and pre-printed stationery. Here they are:
---
env.tex (sample file)
% This is used to print one or more envelopes on the laser printer.
%\begin{envelope}
%Prof. Blah\\
%Department of Mathematics\\
%City, State Zip
%\ZipBar{Zip-Zip}
%\end{envelope}
\documentstyle[12pt,env]{article}
\nofiles
\begin{document}
\sf
\from{Dimitri Vulis}
\begin{envelope}
Dimitri Vulis\\
Department of Mathematics\\
33 West 42 Street\\
New York, NY 10036\\
\ZipBar{10036-8099}
\end{envelope}
\end{document}
---
env.sty:
\textwidth9.5in
\textheight6.675in
\pagestyle{empty}
\special{ps: landscape}
\def\@from{}
\def\from#1{\def\@from{#1}}
\newbox\EnvLeft
\newbox\EnvRight
\newbox\ZipBarL
\newbox\ZipBarS %1/64" 1/32"
\setbox\ZipBarL\hbox{\vrule \@height.125in \@width.015625in\hskip.03125in}
\setbox\ZipBarS\hbox{\vrule \@height.05in \@width.015625in\hskip.03125in}
%each black bar is about 4.6 dots wide on a 300dpi printer
\newcount\ZipBarm
\newcount\ZipBarn
\chardef\ten=10
%Almost like using \ifcase... except `-' is ignored.
\def\ZipBar@@@#1#2{\expandafter\def\csname ZipBar@@#1\endcsname%
{#2\advance\ZipBarn#1\relax}}
\ZipBar@@@0{\copy\ZipBarL\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS\copy\ZipBarS}
\ZipBar@@@1{\copy\ZipBarS\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL\copy\ZipBarL}
\ZipBar@@@2{\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS\copy\ZipBarL}
\ZipBar@@@3{\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL\copy\ZipBarL\copy\ZipBarS}
\ZipBar@@@4{\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL}
\ZipBar@@@5{\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS}
\ZipBar@@@6{\copy\ZipBarS\copy\ZipBarL\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS}
\ZipBar@@@7{\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL}
\ZipBar@@@8{\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS}
\ZipBar@@@9{\copy\ZipBarL\copy\ZipBarS\copy\ZipBarL\copy\ZipBarS\copy\ZipBarS}
\def\ZipBar@@#1{\csname ZipBar@@#1\endcsname}
\def\ZipBar@#1{%
\ifx#1\null%
\let\next\relax%
\else%
\ZipBar@@{#1}%
\let\next\ZipBar@%
\fi%
\next}
\def\ZipBar#1{%
\setbox\EnvRight\hbox{%
\copy\ZipBarL% start with a long bar
\ZipBarn\z@%
\ZipBar@#1\null%
\ZipBarm\ZipBarn%
\divide\ZipBarm\ten%
\multiply\ZipBarm\ten%
\advance\ZipBarm-\ZipBarn%
\ifnum\ZipBarm<0%
\advance\ZipBarm\ten%
\fi%
\ZipBar@@{\the\ZipBarm}% last digit, so that the sum is divisible by ten
\copy\ZipBarL% end with a long bar
}}
\def\corner{\setbox\EnvLeft\hbox}
\def\envelope{
\newpage
\setbox\EnvRight\hbox{\vrule \@height.125in \@width \z@}
\setbox\EnvLeft\null
\raggedright
\vspace*{2.985in}% Fill in the blank on our stationary---change as needed
\parindent.32in% left aligns with the pre-printed return address
\@from
\vfill
\parindent3.5in}
%A fancier way would be to put the street address in a box and to center it
\def\endenvelope{\par
\parindent.32in% left aligns with the pre-printed return address
\vbox{%
\vspace{.5in}%
\hbox to \hsize{%
\vbox {\vss\box\EnvLeft}
\hfill%
\box\EnvRight%
\hskip1.5in %from zip bar to right edge
}%
\vskip.375in %from zip bar to bottom
}}
---
Dimitri Vulis
CUNY GC Math
Technical Details
Message-ID:
<9101310318.AA21806@lilac.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!ucbvax!CUNYVMS1.BITNET!DLVShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!ucbvax!CUNYVMS1.BITNET!DLV From: DLV@CUNYVMS1.BITNET Newsgroups: comp.mail.misc Subject: postnet bar codes Message-ID: <9101310318.AA21806@lilac.berkeley.edu> Date: 31 Jan 91 03:12:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 134