Article View: comp.lang.postscript
Article #8190Re: PostScript banner program wanted
From: Randal L. Schwartz Stonehenge
Date: Tue, 04 Apr 1989 14:45
Date: Tue, 04 Apr 1989 14:45
74 lines
2694 bytes
2694 bytes
In article <177@indri.primate.wisc.edu>, bin@primate (Brain in Neutral) writes:
| I am looking for a program similar to /usr/games/banner, except
| that I'd like it to generate PostScript for printing "real" characters
| rather than large characters faked by printing many small characters.
| Anybody have such a thing? C preferred for Unix, but variants welcome
| too, of course.
Well, you could steal the big text generator example out of the blue
book... and it's *all* in Postscript. Here's how I generate my name
over 4 pages:
%!
/inch {72 mul} def
/leftmargin .5 inch def
/bottommargin .25 inch def
/pagewidth 7.5 inch def
/pageheight 10 inch def
/printposter.dict 10 dict def
/printposter {
printposter.dict begin
/rows exch def
/columns exch def
/bigpicproc exch def
newpath
leftmargin bottommargin moveto
0 pageheight rlineto
pagewidth 0 rlineto
0 pageheight neg rlineto
closepath
clip
leftmargin bottommargin translate
0 1 rows 1 sub
{
/rowcount exch def
0 1 columns 1 sub
{
/colcount exch def
gsave
pagewidth colcount mul neg
pageheight rowcount mul neg
translate
bigpicproc
copypage erasepage
grestore
} for
} for
end % printposter.dict
} def
{
/Times-Roman findfont 10 inch scalefont setfont
0.2 inch setlinewidth
newpath
1 inch 1 inch moveto
(Randal) false charpath
stroke
} 4 1 printposter
======================================== snip snip
Just replace "Randal" with your text (unless you want to say "Randal" :-),
and possibly change the "4 1" to something that has enough pages to hold
your text (that's pages-wide, pages-high, in case you can't decipher the
code).
Works for me.
--
/=====Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095========\
{ on contract to BiiN (for now :-) Hillsboro, Oregon, USA. }
{<@intel-iwarp.arpa:merlyn@intelob.intel.com> ...!uunet!tektronix!biin!merlyn }
\=====Cute quote: "Welcome to Oregon... home of the California Raisins!"======/
Technical Details
Message-ID:
<4267@omepd.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!ogccse!littlei!omepd!merlynReferences:
<177@indri.primate.wisc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!ogccse!littlei!omepd!merlyn From: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Newsgroups: comp.lang.postscript,comp.sources.wanted Subject: Re: PostScript banner program wanted Message-ID: <4267@omepd.UUCP> Date: 4 Apr 89 14:45:36 GMT References: <177@indri.primate.wisc.edu> Sender: news@omepd.UUCP Reply-To: merlyn@intelob.intel.com (Randal L. Schwartz @ Stonehenge) Followup-To: comp.lang.postscript Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA Lines: 74 In-reply-to: bin@primate.wisc.edu (Brain in Neutral)