🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Dan Ehrlich Wed, 17 Dec 1986 20:40
Help with LaserWriter Plus/PostScript
#3177
Author: Dan Ehrlich
Date: Wed, 17 Dec 1986 20:40
30 lines
1625 bytes
We just got a couple of LaserWriter Pluses in the department, and being
adventerous tried changing the printer name with the attach PostScript
program.  This always results in the following error showing up in the
log file:

	%%[ Error: undefined; OffendingCommand: setprintername ]%%

From reading in "PostScript Language Reference Manual" the program appears
to be correct.  The "setprintername" command has a dagger after it, along
with a number of other "set*" commands, but I cannot find what the dagger
means.  Any help would be appreciated.  Thanks in advance.

========================= SetPrinterName.PS ===================================
%!
serverdict begin
statusdict begin
0 checkpassword
	{0 exitserver}
	{(Incorrect Server Password!!)= flush stop}
ifelse
(PSU/CS-LaserWriter0) setprintername
end
===============================================================================

--
Dan Ehrlich
Computer Science Department
The Pennsylvania State University
ehrlich@psuvax1.uucp
ehrlich@psuvax1.bitnet
Re: Help with LaserWriter Plus/PostScript
#3178
Author: Glenn Reid
Date: Fri, 19 Dec 1986 01:16
38 lines
2064 bytes
>We just got a couple of LaserWriter Pluses in the department, and being
>adventerous tried changing the printer name with the attach PostScript
>program.  This always results in the following error showing up in the
>log file:
>
>	%%[ Error: undefined; OffendingCommand: setprintername ]%%
>
>From reading in "PostScript Language Reference Manual" the program appears
>to be correct.  The "setprintername" command has a dagger after it, along
>with a number of other "set*" commands, but I cannot find what the dagger
>means.  Any help would be appreciated.  Thanks in advance.

    The dagger means that you must exit the server loop before
    executing that particular operator.  This is not the problem,
    since you have done that in your example file.

    The problem is that "exitserver" will start a new job, and once
    it is executed, neither serverdict nor statusdict will be present
    on the dictionary stack (This is why you don't need a
    corresponding "end" for "serverdict begin".  Here is a revised
    version of your program which should work correctly:

%!
0000
serverdict begin
statusdict begin
dup checkpassword {
    exitserver
}{
    (      ) cvs print
    ( is not the correct server password.)= flush stop
} ifelse

% here begins a new job, in effect.  Hereafter all definitions will
% remain until the printer is re-booted.
statusdict begin
    (PSU/CS-LaserWriter0) setprintername
end
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads