Switching to HP Emulation for the Current Job
---------------------------------------------
Below is PostScript code that will switch the LaserWriter IIf, IIg, and LaserWriter Pro PostScript interpreter into HP LaserJet IIP emulation mode for the duration of the current job. It requires first configuring the port to be used for PostScript "Binary" mode (versus Normal), or a rangecheck error will be generated.
currentfile /LaserJetIIP statusdict /emulate get exec
The code must precede each job that will use HP LaserJet IIP emulation, and only works on the LaserWriter IIf, IIg, and LaserWriter Pro printers. The emulate operator is currently specific to these printers. The emulator will exit, returning to PostScript, if either of the following conditions occur:
The current job ends.
This is defined as when the printer receives a control-D or when the
emulator's 30-second wait timeout expires. Note that this 30-second
timer can't be changed, and overrides the normal WaitTimeout value while
the emulator is in control.
The printer receives the ASCII sequence ESC-DEL-Zero (Decimal ASCII 27,
127, 48).
This causes the emulator to exit to PostScript, where more printing can
occur before the end of job. However, when the emulator exits, it ejects
the current page. This prevents any mixing of PostScript and HP LaserJet
data on a single page.
Permanently Switching to HP Emulation
-------------------------------------
A communications port can also be configured for HP LaserJet IIP emulation so that the setting persists across jobs and power cycles. This is just as if the setting were made from the LaserWriter Utility's Configure Communication feature, and requires that the push-wheel mode switch be in one of positions 6 through 9.
To configure the serial port, download this PostScript code to your LaserWriter:
(%Serial_NV4%)
<< /Protocol /Binary
/Interpreter /LaserJetIIP
>> setdevparams
The first line tells the setdevparams operator which parameter set is to be
changed. Possible values here are:
(%Serial_NV%) for push-wheel position 6
(%Serial_NV2%) for 7
(%Serial_NV3%) for 8
(%Serial_NV4%) for 9
If the mini-DIN 8 port is being used, substitute "SerialB" into the string for all instances of "Serial."
Note: If you remove the "_NV" portion from "(%Serial_NV4%)", such as (%Serial4%), the settings will not persist and the printer will return to PostScript mode under the conditions mentioned above.
To configure the parallel port, download this PostScript code to your LaserWriter:
%%Begin (%Parallel_NV3%) %Modifies the 3rd changeable pos.(setting 8)
<< /Enabled true %Mark a dictionary on the stack with key/value
/HasNames false %pairs for the various settings.
/Protocol /Raw
/Interpreter /LaserJetIIP
/On true >> setdevparams %Create the dictionary and execute setdevparams
%(which uses it to modify the parameter set.)
%%End
The first line tells the setdevparams operator which parameter set is to be
changed. Possible values here are:
(%Parallel_NV%) corresponds to 6
(%Parallel_NV2%) " " to 7
(%Parallel_NV3%) " " to 8
(%Parallel_NV4%) " " to 9
Note: If you remove the "_NV" portion from "(%Parallel_NV3%)", such as
(%Parallel3%), the settings will not persist and the printer will return to
PostScript mode under the conditions mentioned above.
Switching Back to PostScript
----------------------------
Switching a communications port back to PostScript mode requires sending the following variation of the above code to a port that is still configured for PostScript:
(%Use the same parameter set here as used in the previous code%)
<< /Protocol /Binary
/Interpreter /PostScript
>> setdevparams
If all available ports have been configured for HP LaserJet IIP emulation, returning to PostScript will require changing the push-wheel switch to one of positions 0 through 5.
Article Change History
----------------------
28 Sep 1994 - Revised formatting, reviewed for technical accuracy.
12 Apr 1993 - Updated to include information about the LaserWriter Pro.
Support Information Services