🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8543

Re: ASCII -> Postscript Filter

#8543
From: Henry Lai
Date: Thu, 14 Dec 1989 03:44
27 lines
1264 bytes
If you're not looking for anything too fancy, you can use the routines
given in the "green" book. Here is a simple one (if I remember it
correctly) that justs prints the text as is, without any modifications,
kerning, etc.

%!
/s 256 string def
/printloop {
	{currentfile cvlit s readline not 
	{exit}if
	show currentpoint exch pop 12 sub dup 36 le 
	{pop copypage erasepage 0 720 moveto} {0 exch moveto}ifelse
	}loop 
	showpage
}bind def

/Courier findfont 12 scalefont setfont
0 720 moveto printloop % this should be followed by the ASCII text

You should send this to your printer and then send your text file. A ctrl-D
signals end of job to the printer.

(If I remember, the example in the "green" book uses =string instead of
the string I declared. =string is only holds 128 characters.)
-- 
Henry Lai      lai%batcave@larry.mcrcim.mcgill.edu
{mit-eddie,ucbvax,uunet}!mcgill-vision!batcave!lai
Technical Details
Message-ID: <2587171e@batcave.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!batcave.UUCP!lai

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!batcave.UUCP!lai
From: lai@batcave.UUCP (Henry Lai)
Newsgroups: comp.lang.postscript
Subject: Re: ASCII -> Postscript Filter
Message-ID: <2587171e@batcave.uucp>
Date: 14 Dec 89 03:44:30 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 27