#redefining showpage?
8 messages in this thread
More help please —
I have a slight program problem — I have a procedure that I wish to see
executed with each showpage command.
Can anyone suggest a way to have a procedure happen every time a new page is
printed??
Barry
All you have to do is redefine 'showpage'…
*showpage /showpage load def showpage {<put your procedure here> *showpage}
bind def
Tis all…
Whoops, that message was garbled when sent…
It should read, ahem…
/*showpage /showpage load def
/showpage {<put your procedure here> *showpage} bind def
Hope that works better.
One more quick question Nathan — does that still result in the normal showpage
being executed — I do still want that happen, after of course my routine takes
place.
Thanks in advance
Barry
Yes, Barry. His code loads the original showpage into *showpage. When you
redefine the operator with your procedures, note that the last procedure is
*showpage, containing the original showpage definition.
We've been using this to place logos on printed output, regardless of the
application used for printing.
Regards, David.
Notice that showpage was 'appended'. This means that a call to showpage from
any program will still call showpage, only now it will be YOUR showpage. Just
remember that when you actually wish to print a page, you must now call
showpage* or whatever you redefined the true procedure to be named as.
You might run into a positioning problem in that some customer files or some of
your files, might take the entire image region that was defined using
setpageparams (even via letter, etc.). In this scenario the way to get around
is to always append a very short (.5 inch tall) page with your stats. Alas,
then you will double your counter (maybe dividing page number with idiv by two
would help keep the count straight.
Ok, thanks again —
Now, a few more questions and I will be done (I hope <grin>)
I take it that this definition will stay in effect for as long as the machine
is on?
What happens if I want to set showpage back to normal — simply put in a nul
procedure instead of my procedure?
Thanks again — this has been EXTREMELY helpful.
Barry
Thanks for that big favor Nathan — I have wanted to do this routine to insert
a slug line on the pages that we output as a service bureau — I believe it was
you that also gave me the routine to print the system page number, and that
with this will do what I want.
What we are doing is:
SLUG LINE – page (system page number)
12 units up, about 2-3 inches in, and in 6 point courier.
Since we print the system page number we get to know exactly what group of
pages a page goes with, and can keep it straight where things are at.
When I get the routine done completely I will upload it here (commented) so
that others may use it.
We wanted this to help in the service bureau work, and had checked into other
solutions like Bureau Master, but we found that that was a bit like using a
cannon to go squirrel hunting with. <grin>
Barry