[comp.sys.mac.apps] Suppressing LW test page

thisted@galton.uchicago.edu (Ronald A. Thisted) (03/20/91)

I previously asked for a method of suppressing the startup page on a
LaserWriter II NT, claiming that methods that worked on a LW+ failed
to work for me on my NT.  My printer no longer produces the startup
page.  What I learned might be helpful to others.

Scott McGuire (smcguire@eagle.mit.edu) sent me the following code via
email that he has used on II NT's and NTX's:

serverdict begin 0 exitserver
statusdict begin false setdostartpage
/Helvetica findfont 14 scalefont setfont
30 500 moveto
(The do start page is ) show
dostartpage
10 string cvs show
showpage

Remarkably, the code that I had attempted to use was virtually
identical.  When I used Scott's code, the light blinked for a while
and then stopped.  No output, and also no modification to the
"dostartpage" variable on the printer, either.  If I disabled the
commands "0 exitserver" and "false dostartpage", I ended up with a
blank page printed.  I call this version the "safe" version, because
it doesn't change any system-state variables (and it doesn't try to).

At this point, I recalled a problem pointed out to me by Barry Smith
of Blue Sky Software when I had problems including encapsulated
postscript files in TeXtures (a mathematical typesetting language).
He told me of a problem sending postscript code to the printer when
background printing is enabled.  So it occurred to me that it may have
more to do with the way I was sending postscript to the printer than
the postscript code itself.  This turned out to be the case.

I am using the PS Printer desk accessory to send text files to the
printer via Appletalk.  When I turned off background printing, the
modified postscript code (the "safe" code) produced a page with
printing on it, telling me (as I already knew) that dostartpage was
true.

So, encouraged, I removed the comments about the "unsafe" code and
used PS Printer to send it to the printer once again.  Once more, I
had only blinking lights and no output or change of printer state.
Some experimentation showed that whenever I had
"serverdict begin 0 exitserver" in my postscript code, I never got any
output or (apparently) any effect.  I began to suspect that my
printer's postscript password had been changed from 0--a deeply upsetting
possibility.

On a whim, I rebooted the LW in serial mode/9600 baud and attached my
mac to it as a terminal [null modem required].  Control-T worked as
advertised to elicit a status report on the terminal:

%%[ status: waiting; source: serial 25 ]%%
                                           <- At this point, type the word
                                             "executive" (blindly) which 
                                             results in the interactive
                                             Postscript prompts:
PostScript(r) Version 47.0
Copyright (c) 1984, '85, '86, '87 Adobe Systems Inc.
Copyright (c) 1981 Linotype     All Rights Reserved.
PS>serverdict begin 0 exitserver
%%[ exitserver: permanent state may be changed ]%%
                                   <- !!! Success.  At this point,
                                     I typed in the magic words 
                                     to turn off the startup page,
                                     "statusdict begin false setdostartpage
                                     followed by "executive" again:
PostScript(r) Version 47.0
Copyright (c) 1984, '85, '86, '87 Adobe Systems Inc.
Copyright (c) 1981 Linotype     All Rights Reserved.
PS>/Helvetica findfont 14 scalefont setfont
PS>30 500 moveto
PS>(The do start page is ) show
PS>dostartpage
PS>10 string cvs show
PS>showpage
PS>quit

This produced a page which informed me that
     The do start page is false

And from then on, no startup pages have been produced.  I still do not
know why the identical code transmitted in batch mode postscript via
PS Printer failed, but worked when done interactively.  I welcome any
explanations from PostScript or LaserWriter or MacOS gurus.

[Thanks to Mark Irwin and alanh@cup.portal.com who suggested the
application Widgets from CE Software, and to Adam Frix who also mailed
me postscript code substantially equivalent to the above.]
Ron Thisted
Department of Statistics/The University of Chicago
thisted@galton.uchicago.edu