[PLUG] LJ5 Envelope Printing

Keith Lofstrom keithl at gate.kl-ic.com
Sat Jan 26 04:24:30 UTC 2013


Envelope printing:

The situation for printing envelopes has never been good;
I suspect the people who write the programs don't use postal
mail, or use european sized envelopes.

I've used HP postscript printers for over a decade, so I
finally buckled down and wrote the postscript for printing
a simple envelope (yes, raw postscript).  And starting with
a postscript file for a different recipient, I text edit
the file to make a new file with some of the fields replaced.

It works well enough for me that I haven't even bothered to
make a little Perl script that I can just feed an address.
That would be handy, because when I use different printers,
I need to change the X and Y offsets in the postscript file,
and sometimes I change the quantities, so I can print out
multiple envelopes to a recurring recipient like my business
partners or my accountant.

The more "interesting" trick is printing labels.  I have a
few files with "for" loops in them.  Again, perhaps better
done with a Perl script and a config file.  I've even put
in pixel maps and vector graphics for logos. 

Here's an envelope example:
- - - - - - - - - - - cut here - - - - - - - - - - - - - - - - 
%!PS-Adobe-2.0
/#copies 1 def
%  take out the "%" on the "statusdict" line to print envelopes instead
%  of paper
statusdict begin /manualfeed false def 3 setpapertray end
/env { 
90 rotate   0 setgray
/Helvetica-Bold findfont 18 scalefont setfont
460  -206 moveto show
460  -184 moveto show
460  -162 moveto show
460  -140 moveto show
/Helvetica-Bold findfont 14 scalefont setfont
180 -90 moveto show
180 -72 moveto show
180 -54 moveto show
180 -36 moveto show
showpage
} def
%----------------------------------------------------------------------
(Keith Lofstrom)
()
(PO Box 289)
(Beaverton, Oregon 97075)

(Minda Seibert, Community Relations)
(Mercy Corps)
(3015 sw First)
(Portland, OR 97201)
env 
^D
- - - - - - - - - - - cut here - - - - - - - - - - - - - - - - 

Postscript is a weird but understandable programming language.  You
can also feed it into CUPS and print to non-Postscript printers.

I don't suggest this to everyone, but it does point out that there
are very simple ways to get these tasks done.  Rowboats, instead of
giant aircraft carrier programs like Libre Office that do everything
... poorly.

BTW, one last thing - envelopes outgas when they go through the
fuser, and build up deposits that eventually mess up the rollers.
If you do envelopes, plan on tearing the machine down and cleaning
or replacing the fuser after a few thousand envelopes.  There are
probably brands of envelopes that don't do this, but no envelope
maker will tell you that their envelopes have this problem.

Keith

-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993



More information about the PLUG mailing list