[comp.lang.postscript] Printer Emulation Switching On LW NTX

scott@futures.UUCP (Scott Boyd) (02/27/90)

Is there a way in *software* (via Postscript) to get an Apple
LaserWriter NTX to switch among it's various printer emulation modes
(HP LaserJet+, Diable 630, & Postscript). I know it can be done via dip
switches, but our printer is used with a spooler among different
systems, so we'd like to switch printer emulation modes via software.

I know that the Ricoh PC Laser 6000/PS can switch emulations (and even
interfaces: Appletalk, RS-232, Parallel) via a Postscript program.  Or
via escape sequences if it is in HP LaserJet 2 mode.

I have looked in the Apple LaserWriter Owner's Guide and the Red, Blue,
and Green Adobe books to no avail.

Any assistance would be appreciated. Thanks in advance.

-- 
+---------------------+-----------------------------+-------------------------+
| Scott Boyd          | Security is an illusion,    | Commodity Futures, Inc. |
| scott@Futures.COM   | there is only opportunity!  | Woodside, California    |
+---------------------+-----------------------------+-------------------------+

woody@rpp386.cactus.org (Woodrow Baker) (02/28/90)

In article <1897@futures.UUCP>, scott@futures.UUCP (Scott Boyd) writes:
> Is there a way in *software* (via Postscript) to get an Apple
> LaserWriter NTX to switch among it's various printer emulation modes
> (HP LaserJet+, Diable 630, & Postscript). I know it can be done via dip
> switches, but our printer is used with a spooler among different
> systems, so we'd like to switch printer emulation modes via software.
> 

O.k.  There is a way generaly.  I don't have all the info handy.  If you
will do the following for me, I'll be able to dig it out.

Go into executive mode:

turn on file capture (ascii) from your terminal emulator program.
do:

/statusdict load {== ==} forall
/serverdict load {== ==} forall
/$printerdict load {== ==} forall

capture the dumps, and email them to me.  I am in the process of collecting
these dumps for various printers.  In statusdict there is an array 
generaly called openswitch or somehting similar.  It handles the dipswitch
work.  It has clean examples of doing this.  on the PS-810, version 47,
and on the ps800II, the following fragment of code should work.  I think
that there is an  exechplj  exechpgl  diabloexec  proceedure lurking in
status dict.  There is also, in the ps810, a set of routines
hplj   hpgl   diablo.

serverdict begin statusdict begin hplj

serverdict begin statusdict begin hpgl

Should do it.  BE WARNED:  you MUST send  ESC &k3G in hplaserjet mode
because the invocation like this, leaves Postscript in charge of the serial
port rather than the hp code, and thus the cr's will be cooked to lf's.
just another problem of the serial port.

I have been told that  ESC 7f 04  sometimes works to get you back to
postscript from within the hp emulation if you got there by the hardware
switch.  It doesnot work in my printer.  Switching to hpmode as above,
you can get back to Postscript by sending a ^D down to the emulator.

I think the ntx has a suppliment that details sethardwareiomode and setsoftwareiomode commands.
You might need to look at these also.

Cheers
Woody