🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #1541

Re: Printing envelopes

#1541
From: Ronald Florence
Date: Thu, 27 Aug 1992 12:24
37 lines
1889 bytes
Michael Rosen writes:

   Under the "Macros" keyboard, ^E will prompt you to place the cursor at
   the beginning of the address and will print the envelope.  

You can do the same thing in troff.  Putting the cursor before the
address and piping the following text to the script below will print
an envelope.  In vi, try `<esc>:,+7 w !envelope'.  In emacs, set point
and mark around the address and do `<esc>| envelope'.

In the envelope script below, the escape sequence is commands for the
HP Laserjet.  Our lpr switches the printer from Postscript to native
HP mode if the first line is missing the %!; the escape sequence tells
the printer to get the envelope from a different feed and to print in
landscape mode at an appropriate point on the envelope.  It would be
nice to do this in Postscript, but our Postscript cartridge doesn't
seem to know about feeding from an alternate tray or other niceties.

For different printers or different troff macros sets (we use mm),
modify accordingly.

   #!/bin/sh
   # envelope - prints address on envelope

   ( /usr/5bin/echo "\033&l3H\033&l1o14E\033&a55L\c";
   awk '
     $1 ~ /^.DE/ || $1 ~ /^.fi/ { exit }
     $1 !~ /^.DS/ || $1 !~ /^.nf/ { address[i++] = $0 }
   END {
     for (j = 1; j < i; j++)
       printf "%s\n", address[j]
   }' ) | lpr

-- 

				Ronald Florence
				ron@mlfarm.com
Technical Details
Message-ID: <1992Aug27.122443.5263@mlfarm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!mercury.hsi.com!mlfarm!rosie!ron
References: <WPCORP-L%92082609334268@UBVM.CC.BUFFALO.EDU> <1992Aug27.033700.17607@mnemosyne.cs.du.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text
Path: arc1-ca.pugleaf.net!sparky!uunet!mercury.hsi.com!mlfarm!rosie!ron
From: ron@mlfarm.com (Ronald Florence)
Subject: Re: Printing envelopes
In-Reply-To: mrosen@nyx.cs.du.edu's message of Thu, 27 Aug 92 03:37:00 GMT
Message-ID: <1992Aug27.122443.5263@mlfarm.com>
Sender: news@rosie.mlfarm.com
Organization: Maple Lawn Farm, Stonington, CT
References: <WPCORP-L%92082609334268@UBVM.CC.BUFFALO.EDU>
 <1992Aug27.033700.17607@mnemosyne.cs.du.edu>
Date: Thu, 27 Aug 1992 12:24:43 GMT
Lines: 37