CompuServe Thread

#redefining showpage?

8 messages in this thread
#13260From: Barry DowellOct 3, 1989 6:44 PM
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
#13285From: Nathan DicksonOct 4, 1989 11:44 AM
All you have to do is redefine 'showpage'… *showpage /showpage load def showpage {<put your procedure here> *showpage} bind def Tis all…
#13286From: Nathan DicksonOct 4, 1989 11:46 AM
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.
#13323From: Barry DowellOct 5, 1989 12:32 PM
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
#13334From: David McCombOct 5, 1989 5:53 PM
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.
#13341From: Nathan DicksonOct 5, 1989 8:29 PM
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.
#13360From: Barry DowellOct 6, 1989 9:07 AM
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
#13322From: Barry DowellOct 5, 1989 12:12 PM
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