🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7382

Re: Why does this lose?

#7382
From: Glenn Reid
Date: Wed, 03 Aug 1988 17:47
28 lines
1655 bytes
>The following is an attempt to print pages in "four-up" mode, four little
>frames per real page, with appropriate reduction and such.  This is raw
>postscript, not something you plug into your favorite text formatter.  The
>bit Q here is: Why does it fail?!  The error comes at the indicated "show",
>which wimps out claiming "invalidaccess".  Does it have something to do
>with redefining showpage?  What's with it?  The manual tells me nothing about
>why "show" would fail this way; usually when I shove a string on the stack,
>I can do what I want with it.  Replies, if any, to me...

When I run your program, I get an "invalidfont", not an "invalidaccess".
The reason it fails is simple, actually:  your "restore" gets rid of
the current font.  What you have done boils down to this:

	save
	/Times-Roman findfont 12 scalefont setfont
	restore
	0 0 moveto (text) show

Remember that "save" and "restore" also save and restore the graphics
state, and that includes the current font.  There is no current font in
the default graphics state, which is what you return to after the
"restore".

I hope this helps clear up the problem.

Glenn Reid
Adobe Systems
Developer Support
Technical Details
Message-ID: <4140@adobe.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!bu-cs!purdue!decwrl!adobe!ondine!greid
References: <Aug.2.19.27.55.1988.17574@topaz.rutgers.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!bu-cs!purdue!decwrl!adobe!ondine!greid
From: greid@ondine.COM (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: Why does this lose?
Message-ID: <4140@adobe.COM>
Date: 3 Aug 88 17:47:51 GMT
References: <Aug.2.19.27.55.1988.17574@topaz.rutgers.edu>
Sender: news@adobe.COM
Reply-To: greid@ondine.UUCP (Glenn Reid)
Organization: Adobe Systems Incorporated, Mountain View
Lines: 28