🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1605

Procedures over page boundaries

#1605
From: Joe Fulson-Woytek
Date: Tue, 23 Jan 1990 13:41
49 lines
2140 bytes
I am trying to write a Postscript file with a procedure defined in one page
and invoked on both that page and subsequent pages. I know that defining
the procedure in the prologue like this:
     /pr1 {
   % include procedure here
     } def
   %%EndProlog
   %%Page:? ?
   % do some postscript stuff
   % invoke the procedure
    pr1
    gsave showpage grestore
   % go to a new page
   %%Page:? ?
   % do some other postscript stuff
   % invoke the procedure
    pr1
    gsave showpage grestore
   % go to a new page
   %%Page:? ?
works fine. The commands in the procedure pr1 are executed on both pages.
I need, however, the following sequence to work:
   %%EndProlog
   %%Page:? ?
   % do some postscript stuff
     /pr1 {
   % include procedure here
     } def
   % invoke the procedure
    pr1
    gsave showpage grestore
   % go to a new page
   %%Page:? ?
   % do some other postscript stuff
   % invoke the procedure
    pr1
    gsave showpage grestore
   % go to a new page
   %%Page:? ?
In this case, the commands in pr1 are executed on the first page, but not
on the second. The Adobe Postscript manuals are not very illuminating as to
what happens when you go to a new page. The save/restore commands looked 
promising but I couldn't figure out if they are what I need, and how to
use them in this case. Since I've only tried this on a postscript viewer
on my Iris 4d workstation, I am willing to accept the reponse that this
should work- in which case the fault might be with the Iris. 
Any suggestions would be appreciated. If you e-mail to me at
joe@etac632.gsfc.nasa.gov, I will summarize the responses. Thanks.
               Joe Fulson-Woytek
Technical Details
Message-ID: <729@dftsrv.gsfc.nasa.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!dftsrv!etac632!joe

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!dftsrv!etac632!joe
From: joe@etac632 (Joe Fulson-Woytek)
Newsgroups: comp.lang.postscript
Subject: Procedures over page boundaries
Message-ID: <729@dftsrv.gsfc.nasa.gov>
Date: 23 Jan 90 13:41:13 GMT
Sender: news@dftsrv.gsfc.nasa.gov
Reply-To: joe@etac632.gsfc.nasa.gov (Joe Fulson-Woytek)
Organization: NSESCC, Goddard Space Flight Center, Greenbelt MD
Lines: 49