ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/May-Jun/quickie-envelope-printing

This is quickie-envelope-printing in view mode; [Up]


Date: Sun 05-May-1989 13:42:27 From: Unknown Subject: quickie envelope printing Here is an awk script I wrote that prints envelopes on the NeXT printer. You just give it a file that has the return address, a blank line, and then the from address, and the script wraps the appropriate PostScript around it and prints it. It's not exactly earth-shattering, but I find it useful. It works for "business size" envelopes. -- cut here -- #!/bin/awk -f BEGIN { print "%!"; print "/inch {72 mul} def"; print "-90 rotate"; print "-11 inch 2.2 inch translate"; print "/LEAD 12 def"; print "/MAR .25 inch def"; print "/Times-Roman findfont 10 scalefont setfont"; print "MAR 4.1 inch MAR sub moveto currentpoint"; print "/NLshow"; print "{"; print " show moveto"; print " 0 LEAD -1 mul rmoveto"; print " currentpoint"; print "} def"; } /^$/ { if (foundBlank==0) { foundBlank = 1; print "/Times-Roman findfont 14 scalefont setfont"; print "4 inch 2 inch moveto currentpoint"; print "/LEAD 18 def"; } else { print "showpage" print "/LEAD 12 def"; print "/MAR .25 inch def"; print "/Times-Roman findfont 10 scalefont setfont"; print "MAR 4.1 inch MAR sub moveto currentpoint"; print "/NLshow"; foundBlank = 0; } next; } { print "(" $0 ") NLshow"; } END { print "showpage"; }

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.