%!PS-Adobe-2.1
%%Title: PostScript Setup File for SLATE
%%Creator: Symmetry Group
%%CreationDate: 06 Feb 1991
%%For: SLATE Support of PostScript Printers 3.0.0
%%Copyright: 1995 The Symmetry Group, Inc all rights reserved
% =============================================
% = MODULE: SETUP.TXT =
% = VERSION: 3.0.0 =
% = =
% =FUNCTION: SLATE - PostScript Setup File =
% = =
% = SYSTEM: SLATE =
% = SYSVERS: 2.2.11 =
% = CREATED: 06FEB91 =
% = UPDATED: 31JAN95 =
% = =
% = (c) 1991,92,93,94,95 =
% = BY: The Symmetry Group =
% =============================================
% UPDATE NOTE: Be sure to change the Setup File version in
% the Error Handler and Status routines match the current version.
%
% To print Status at the bottom of each page, add STAT to the
% printer Select End string. (Note: The current version of STAT
% will only print in the portrait mode.
%
% This is set to provice a minimum sized file when all
% comments with single '%' are removed and all extra spaces
% are removed.
%
% Functions are described in the form:
%
% <in_parm1> <in_parm2> ... function <out_parm1> ...
% where
% <in_parm..> are the input parameters on the stack
% in the usual PostScript notation.
% <out_parm.> are the output parameters left on the stack.
% function is the function.
%
% Note: Because of the PostScript way of handling text, most functions
% that are called from SLATE have a text string as the first parameter.
% In most cases, this should be printed before any additional operations
% are performed.
%
% Note: To minimize the size of the command strings in SLATE, most
% functions that are to be called from SLATE have one character
% names (usually a capital letter). Internal functions have two
% character names and internal variables have two character names
% starting with '$'. While this is somewhat hard to read (as is
% all PostScript), it results in significantly less data transfer,
% smaller SLATE string space, and a smaller setup file.
%
% Virtual Memory (VM)
% The memory management is rather trickey. We need to conserve
% Virtual Memory in early versions of PostScript which manage to fill
% the current VM with discarded strings and structures while working with
% PostScript Level 2 and later which do automatic garbage collection.
% To acomplish this, two levels of VM are defined at the beginning
% of a SLATE session.
%
% Base VM: The Base VM is created at the beginning of this include file
% with a "save" command. This level contains all features that need
% to be preserved through a SLATE session (global variables,
% definitions, encoding vectors, etc.) It does not include any
% Font data. The Base VM level is created at the beginning of this
% include file and is "restored" at the end of the SLATE session with
% the Close (C) command.
%
% Form VM: The Form VM is created by the Setup (S), the Setup Landscape
% (LS). The Setup Form (FS) command "removes" the current Form VM
% and creates a new one (without Fonts). This provides a VM level
% for storing fonts that can be removed with the Setup Form commands.
%
% Working VM: The Working VM is created at the beginning of a SLATE
% Form with a "save" command (after creating the Form VM:).
% This level contains only current string and temporary data. There
% is no valid data in this level after a command is executed. The
% print page command (and a number of others) delete this level
% and "save" a new Working VM level.
%
% Form VM Features: To install a feature in the Form VM, "restore"
% to get out of the Working VM, create the feature, and "save" to
% create a new Working VM. (Of course the current stack status
% must also be considered.
%
% Note: Special care must be taken when moving to the Form VM
% level within a command that has strings on the stack. The
% string is stored in the Working VM level and will cause errors
% if it is still on the stack when "restore" is called. Two
% string buffers are provided in the Base VM level for holding
% strings that must be passed to the lower level. See the "F"
% command for an example of this usage.
%
% Note: The HP/Adobe cartridge (Level 1 Vers 52.2) causes
% special problems when switching to Duplex mode on an odd page.
% There appears to be a bug (either in the HP code or the Adobe
% code) that causes the printer to hang if any significant amount
% of image data is printed. The patch to stop this problem is
% rather complex since the effective page number is reset if
% the paper size is changed.
%
% HISTORY:
% VERS DATE BY NOTES
%
% 2.2.0 06 Feb 91 CVP Created
% 2.2.2 07 Nov 91 CVP -Add "Y" Macro to select only.
% -Modify "T" and "X" macros to handle
% errors correctly.
% 21 Nov 91 CVP -Add IBM-2 encoding vector and function
% (partial).
% 2.2.6C 27 Jul 92 CVP -Add "IS2" Macro for non square image
% pixels.
% -Add Timeout set
% -Reset Paper Tray & Duplex
% -Reset Copies
% 2.2.7 04 Nov 92 CVP -Add Color support.
% 2.2.11 15 Dec 93 CVP -Add STAT command to print machine status &
% include it in new page command.
% -Develop save/restore memory management
% system to prevent leakage of VM memory.
% -Add "bind" to most functions to improve
% speed.
% -Rewrite handleerror.
% -Revise timeout routines and set them in
% the lowest VM area.
% -Add more carefull testing of PS features
% before using them.
% -Revise Paper Tray Select to work with
% level 2 printers.
% 3.0.0 20 Sep 94 CVP -Improve notes about VM.
% -Add additional level of VM for Form VM.
% -Improve Error Reporting.
% -Add Form Setup.
% -Improve PSTAT message positioning.
% -Fix Duplex Printer bug.
% -Add PostScript Level 2 control.
% 31 Jan 95 CVP -Add DMS for LJ 4M+.
%
%%EndComments
%
% EJECT SECTION(Initialize & Define Globals)
%
% *** Create a Working Dictionary ***
%
% - () <save>
%
% (Call 'C' at the end to return to the initial state.)
%
save %Base VM
/$WD 150 dict def $WD begin
% *** SLATE PS Temporary Global Variables (in $WD) ***
% $V Vertical Scale (points per current unit)
% $H Horizontal Scale (points per current unit)
% $L Page Length (current units)
% $W Page Width (current units)
% $O Orentation (0-3)
% $T Tumble (bool)
% $RC Form Select Command
% $I2 IBM-2 8 Encoding Vector
% $R8 Roman 8 Encoding Vector
% $WN Windows Encoding Vector
% $N Working Font Directory
% $PS Postscript Level
% $FP Front Side (bool)
% $R Form Type
% *** Define Globals ***
/$V 1 def
/$H 1 def
/$L 792 def
/$W 612 def
/$O 0 def
/$T false def
/$TMP 40 string def
/$TMP1 40 string def
/$PS /languagelevel where {pop languagelevel} {1} ifelse def
/$FP true def
/$R 0 def
% EJECT SECTION(Error Reporting)
% *** handleerror - Replacement Error Handler ***
% This replaces the standard proceedure with a
% proceedure to write error data at the bottom
% of the page and then execute the old procedure.
% NOTE: errordict is the current dictionary when
% executing.
%
errordict /handleerror
{
/Courier-Bold findfont 9 scalefont setfont
initgraphics
20 153 moveto
(*** SLATE PostScript Error ***) show
20 144 moveto
( Product: ) show /product where
{pop product}
{(Unknown )}
ifelse show
( Version:) show version show
20 135 moveto
( PS Level: ) show /languagelevel where
{pop languagelevel}
{1}
ifelse 20 string cvs show
( Setup File: 3.2.0) show %*********Change Here***********
20 126 moveto
( Error Type: ) show $error /errorname get 20 string cvs show
20 117 moveto
(Error Command: ) show $error /command get 20 string cvs show
20 108 moveto
( Stack: ) show
$error /ostack get dup length 20 string cvs show
{currentpoint exch pop 9 sub 80 exch moveto dup 20 string cvs show
currentpoint exch pop 180 exch moveto
(\() show type 20 string cvs show (\)) show}
forall
currentpoint exch pop 60 exch moveto (->) show
copypage
} put
% EJECT SECTION(Print Status Functions)
% These functions only work in all Orentations.
% Call STAT to enable printing a status message at
% the bottom right of each page.
%
% *** STAT - Enable Print Status ***
%
% - STAT -
%
/STAT {/STX {PSTAT} def } bind def
% *** STX - Print Status ***
%
% - STX -
%
/STX {} bind def
% *** PSTAT - Print Status (Internal) ***
%
% - PSTAT -
%
/PSTAT {save
/Courier-Bold findfont 9 $H div scalefont setfont
$W 324 $H div sub dup () exch H $L 90 $V div sub () exch V
( Product: ) show /product where
{pop product}
{(Unknown )}
ifelse show
( Version:) show version show
dup () exch H $L 81 $V div sub () exch V
( PS Level: ) show /languagelevel where
{pop languagelevel}
{1}
ifelse 20 string cvs show
( Setup File: 3.2.0) show %*********Change Here***********
dup () exch H $L 72 $V div sub () exch V
( VM Status: Max:) show vmstatus 20 string cvs show
( Used:) show 20 string cvs show
( Level:) show 20 string cvs show
dup () exch H $L 63 $V div sub () exch V
(Oper Stack Count: ) show count 20 string cvs show
dup () exch H $L 54 $V div sub () exch V
(Dictionary Count: ) show countdictstack 20 string cvs show
dup () exch H $L 45 $V div sub () exch V
(Exec Stack Count: ) show countexecstack 20 string cvs show
pop restore} bind def
% EJECT SECTION(Setup Operations)
% These operations setup special operations for PostScript
% level 2 systems.
%
$PS 2 ge
{% Set Tray & Size Selection
1 dict dup /Policies
2 dict dup /PageSize 2 put
dup /MediaType 0 put
put setpagedevice}
if
% EJECT SECTION(Reset Timeouts)
% *** Set Waittimeout to 0 ***
% This sets the wait timeout to 0 (to ignore timeout).
%
/statusdict where
{pop statusdict /waittimeout known
{statusdict /waittimeout 0 put}
if}
if
% *** Set Jobtimeout to 0 ***
% This sets the job timeout to 0 (to ignore timeout).
%
/statusdict where
{pop statusdict begin /setjobtimeout where
{pop 0 setjobtimeout}
if end}
if
% *** Set Manualfeedtimeout to 0 ***
% This sets the maual feed timeout to 0 (to ignore timeout).
%
/statusdict where
{pop statusdict /manualfeedtimeout known
{statusdict /manualfeedtimeout 0 put}
if}
if
% EJECT SECTION(Form Commmands)
% *** Form Commands ***
%
/$RC [
%-6 DL Envelope
{statusdict begin
{dlenvelope} stopped pop end
/$W 312 store /$L 624 store}
%-5 B5 Envelope
{statusdict begin
{b5} stopped pop %For some printers
{b5envelope} stopped pop end
/$W 499 store /$L 709 store}
%-4 C5 Envelope
{statusdict begin
{c5envelope} stopped pop end
/$W 459 store /$L 649 store}
%-3 Commercial #10 Envelope
{statusdict begin
{com10envelope} stopped pop end
/$W 297 store /$L 684 store}
%-2 Commercial #9 Envelope
{statusdict begin
{com9envelope} stopped pop end
/$W 279 store /$L 639 store}
%-1 Monarch Envelope
{statusdict begin
{monarcenvelope} stopped pop end
/$W 279 store /$L 540 store}
%0 Letter
{statusdict begin
{letter} stopped pop end
/$W 612 store /$L 792 store}
%1 Wide Letter (dummy)
{statusdict begin
{letter} stopped pop end
/$W 612 store /$L 792 store}
%2 Legal
{statusdict begin
{legal} stopped pop end
/$W 612 store /$L 1008 store}
%3 Executive
{statusdict begin
{executivepage} stopped pop end
/$W 522 store /$L 756 store}
%4 Half Letter (dummy)
{statusdict begin
{letter} stopped pop end
/$W 396 store /$L 612 store}
%5 Ledger/Tabloid
{statusdict begin
{11x17} stopped pop end
/$W 792 store /$L 1224 store}
%6 A3
{statusdict begin
{a3} stopped pop end
/$W 842 store /$L 1191 store}
%7 A4
{statusdict begin
{a4} stopped pop end
/$W 595 store /$L 842 store}
%8 A5
{statusdict begin
{a5} stopped pop end
/$W 420 store /$L 595 store}
%9 B5
{statusdict begin
{b5} stopped pop end
/$W 516 store /$L 729 store}
] def
% EJECT SECTION(IBM-2 Encloding Vector)
% *** IBM-2 Encoding Vector ***
%
/$I2 [
39/quotesingle
94/circumflex
96/grave
126/tilde
128/Ccedilla
129/udieresis
130/eacute
131/acircumflex
132/adieresis
133/agrave
134/aring
135/ccedilla
136/ecircumflex
137/edieresis
138/egrave
139/idieresis
140/icircumflex
141/igrave
142/Adieresis
143/Aring
144/Eacute
145/ae
146/AE
147/ocircumflex
148/odieresis
149/ograve
150/ucircumflex
151/ugrave
152/ydieresis
153/Odieresis
154/Udieresis
155/cent
156/sterling
157/yen
158/Pts
159/florin
160/aacute
161/iacute
162/oacute
163/uacute
164/ntilde
165/Ntilde
166/ordfeminine
167/ordmasculine
168/questiondown
170/logicalnot
171/onehalf
172/onequarter
173/exclamdown
174/guillemotleft
175/guillemotright
225/germandbls
226/Gamma
227/pi
228/Sigma
229/sigma
230/mu
231/tau
232/Phi
233/Theta
234/Omega
235/delta
236/infinity
237/phi
238/epsilon
239/intersection
240/equivalence
241/plusminus
242/greaterequal
243/lessequal
246/divide
247/approxequal
248/degree
249/productdot
250/periodcentered
251/radical
252/nsuperior
253/twosuperior
254/filledbox
] def
% EJECT SECTION(Roman 8 Encloding Vector)
% *** Roman 8 Encoding Vector ***
%
/$R8 [
127/square
161/Agrave
162/Acircumflex
163/Egrave
164/Ecircumflex
165/Edieresis
166/Icircumflex
167/Idieresis
168/acute
169/grave
170/circumflex
171/dieresis
172/tilde
173/Ugrave
174/Ucircumflex
175/sterling
176/overscore
177/Yacute
178/yacute
179/degree
180/Ccedilla
181/ccedilla
182/Ntilde
183/ntilde
184/exclamdown
185/questiondown
186/currency
187/sterling
188/yen
189/section
190/florin
191/cent
192/acircumflex
193/ecircumflex
194/ocircumflex
195/ucircumflex
196/aacute
197/eacute
198/oacute
199/uacute
200/agrave
201/egrave
202/ograve
203/ugrave
204/adieresis
205/edieresis
206/odieresis
207/udieresis
208/Aring
209/icircumflex
210/Oslash
211/AE
212/aring
213/iacute
214/oslash
215/ae
216/Adieresis
217/igrave
218/Odieresis
219/Udieresis
220/Eacute
221/idieresis
222/germandbls
223/Ocircumflex
224/Aacute
225/Atilde
226/atilde
227/Eth
228/eth
229/Iacute
230/Igrave
231/Oacute
232/Ograve
233/Otilde
234/otilde
235/Scaron
236/scaron
237/Uacute
238/Ydieresis
239/ydieresis
240/Thorn
241/thorn
242/periodcentered
243/mu
244/paragraph
245/threequarters
246/minus
247/onequarter
248/onehalf
249/ordfeminine
250/ordmasculine
251/guillemotleft
252/stop
253/guillemotright
254/plusminus
] def
% EJECT SECTION(Windows Encloding Vector)
% *** Windows Encoding Vector ***
%
/$WN [
39/quotesingle
96/grave
124/bar
145/quoteleft
146/quoteright
147/quotedblleft
148/quotedblright
149/bullet
150/endash
151/emdash
160/space
164/currency
166/brokenbar
167/section
168/dieresis
169/copyright
170/ordfeminine
171/guillemotleft
172/logicalnot
173/hyphen
174/registered
175/macron
176/degree
177/plusminus
178/twosuperior
179/threesuperior
180/acute
181/mu
182/paragraph
183/periodcentered
184/cedilla
185/onesuperior
186/ordmasculine
187/guillemotright
188/onequarter
189/onehalf
190/threequarters
191/questiondown
192/Agrave
193/Aacute
194/Acircumflex
195/Atilde
196/Adieresis
197/Aring
198/AE
199/Ccedilla
200/Egrave
201/Eacute
202/Ecircumflex
203/Edieresis
204/Igrave
205/Iacute
206/Icircumflex
207/Idieresis
208/Eth
209/Ntilde
210/Ograve
211/Oacute
212/Ocircumflex
213/Otilde
214/Odieresis
215/multiply
216/Oslash
217/Ugrave
218/Uacute
219/Ucircumflex
220/Udieresis
221/Yacute
222/Thorn
223/germandbls
224/agrave
225/aacute
226/acircumflex
227/atilde
228/adieresis
229/aring
230/ae
231/ccedilla
232/egrave
233/eacute
234/ecircumflex
235/edieresis
236/igrave
237/iacute
238/icircumflex
239/idieresis
240/eth
241/ntilde
242/ograve
243/oacute
244/ocircumflex
245/otilde
246/odieresis
247/divide
248/oslash
249/ugrave
250/uacute
251/ucircumflex
252/udieresis
253/yacute
254/thorn
255/ydieresis
] def
% EJECT SECTION(Setup & Close)
% *** S - Setup Printer ***
% Set printer resolution (and working units).
% (This assumes standard 1/72 in units to start.)
% Also adjust current page width & length.
% Save VM to restore at end of page.
%
% <horz_res> <vert_res> S <save> <save>
%
/S {
72 exch div /$V exch store
72 exch div /$H exch store
/$L $L $V div store /$W $W $H div store
/$O 0 store
/$T false store
save %to Form VM
$H $V scale
save %to Working VM
() D
} bind def
% *** LS - Setup Printer (Landscape) ***
% Set printer resolution (and working units).
% Change to Landscape Mode.
% (This assumes standard 1/72 in units to start.)
% Also adjust current page width & length.
% Save VM to restore at end of page.
%
% <horz_res> <vert_res> LS <save> <save>
%
/LS { %Form VM
72 exch div /$V exch store
72 exch div /$H exch store
/$L $W /$W $L $V div store $H div store
/$O 1 store
/$T true store
save %to Form VM
$H $V scale
90 rotate
save %to Working VM
() D
} def
% *** DMS - Special DeferredMediaSelection Setup ***
% Call after the S function if necessary.
%
% <save> <save> <string> DMS <save> <save>
%
/DMS {
P
restore %to Form VM
$FP %Save $FP
exch restore %to Base VM
/$FP exch store
1 dict dup /DeferredMediaSelection true put setpagedevice
save %to Form VM
$H $V scale
0 0 moveto
save %to Working VM
() D
} def
% *** FS - Setup Form ***
% Set printer formsize, orentation, and duplex mode
% Remove all existing fonts.
% Also adjust current page width & length.
% Save VM to restore at end of page.
%
% <save> <save> <string> <tmb> <oren> <form> FS <save> <save>
%
% <tmb> 0 to not tumble (long edge bind)
% 1 to tumble (short edge bind)
% <oren> orentation (0-3)
% <form> form code
%
/FS {
4 -1 roll P
4 -1 roll restore %to Form VM
4 -1 roll restore %to Base VM
/$FP true store
dup /$R exch store
/$RC load exch 6 add get exec
/$O exch store
1 eq /$T exch store
$O 0 eq {$W $L $V div /$L exch store $H div /$W exch store} if
$O 1 eq {$L $W $V div /$L exch store $H div /$W exch store} if
$O 2 eq {$W $L $V div /$L exch store $H div /$W exch store} if
$O 3 eq {$L $W $V div /$L exch store $H div /$W exch store} if
save %to Form VM
$H $V scale
$O 0 eq {0 rotate} if
$O 1 eq {90 rotate} if
$O 2 eq {180 rotate} if
$O 3 eq {270 rotate} if
0 0 moveto
save %to Working VM
() D
} bind def
% *** C - Closing Function ***
% (and handle character string.)
% Restore VM from start. End Working Dictionary.
%
% <save> <save> <save> <string> C -
%
/C {P restore %to Form VM
/#copies 1 store
/statusdict where
{pop statusdict begin
/manualfeed where
{/manualfeed false put} if
0 {setpapertray} stopped {pop} if
false {setduplexmode} stopped {pop} if
false {settumble} stopped {pop} if
end} if
restore %to Base VM
end restore %to Original VM
} bind def
% EJECT SECTION(Size & Position)
% *** W - Set Page Width ***
% In current units
% (and handle character string.)
%
% <save> <string> <page_wid> W <save>
%
/W {exch P
currentpoint 4 -1 roll restore moveto
/$W exch store
save} bind def
% *** L - Set Page Length ***
% In current Units
% (and handle character string.)
%
% <save> <string> <page_len> L <save>
%
/L {exch P
currentpoint 4 -1 roll restore moveto
/$L exch store
save} bind def
% *** H - Set Horizontal Position ***
% (In current Units)
% (and handle character string.)
%
% <string> <horz_pos> H -
%
/H {exch P
$O 2 eq {$W sub} if
$O 3 eq {$W sub} if
currentpoint exch pop moveto} bind def
% *** V - Set Vertical Position ***
% (In current Units)
% (Also convert from current orentation Reference to top Right)
% (and handle character string.)
%
% <string> <vert_pos> V -
%
/V {exch P
$O 0 eq {$L exch sub} if
$O 1 eq {0 exch sub} if
$O 2 eq {0 exch sub} if
$O 3 eq {$L exch sub} if
currentpoint pop exch moveto} bind def
% *** R - Carriage Return ***
% (and handle character string.)
%
% <string> R -
%
/R {P currentpoint exch pop 0 exch moveto} bind def
% EJECT SECTION(Page & Bin Select)
% *** N - New Page ***
% (and handle character string.)
%
% <save> <string> N <save>
%
/N {P STX showpage
restore
/$FP $FP not store
save 0 0 moveto} bind def
% *** T - Tray Select ***
% (and handle character string.)
% and print page.
%
% <save> <string> <tray> <manual> T <save>
%
% <tray> 0 - n Tray Number
% -1 Not Used
% <manual> 0 Not Manual Feed
% 1 Manual Feed
% -1 Not Used
%
% NOTE: On some machines, setpapertray resets the CTM and position. Also
% on some machines, grestore restores the old paper tray. Thus the
% complex command is necessary for paper tray select.
%
/T {3 -1 roll P
STX showpage
3 -1 roll restore
/$FP $FP not store
/statusdict where
{pop statusdict begin
dup -1 eq
{pop}
{1 eq /manualfeed exch store}
ifelse
dup -1 eq
{pop}
{currentpoint matrix currentmatrix 4 -1 roll
{setpapertray} stopped {pop} if
setmatrix moveto}
ifelse
end}
{pop pop}
ifelse
save 0 0 moveto } bind def
% *** Y - Tray Select (No Page Print) ***
% (and handle character string.)
%
% <save> <string> <tray> <manual> Y <save>
%
% <tray> 0 - n Tray Number
% -1 Not Used
% <manual> 0 Not Manual Feed
% 1 Manual Feed
% -1 Not Used
%
% NOTE: On some machines, setpapertray resets the CTM and position. Also
% on some machines, grestore restores the old paper tray. Thus the
% complex command is necessary for paper tray select.
%
/Y {3 -1 roll P
currentpoint 5 -1 roll restore moveto
/statusdict where
{pop statusdict begin
dup -1 eq
{pop}
{1 eq /manualfeed exch store}
ifelse
dup -1 eq
{pop}
{currentpoint matrix currentmatrix 4 -1 roll
{setpapertray} stopped {pop} if
setmatrix moveto}
ifelse
end}
{pop pop}
ifelse
save} bind def
% *** X - Duplex Select ***
% (and handle character string.)
%
% <save> <string> <dpx> X <save>
%
% <dpx> 0 Not Duplex
% 1 Duplex
%
% NOTE: On some machines, setduplexmode resets the CTM and position. Also
% on some machines, grestore restores the old duplex mode tray. Thus the
% complex command is necessary for duplex select.
%
%
/X {exch P
currentpoint 4 -1 roll restore moveto
/statusdict where
{pop statusdict begin
currentpoint matrix currentmatrix 4 -1 roll
1 eq {setduplexmode} stopped {pop} if
$T {settumble} stopped {pop} if
setmatrix moveto end}
{pop}
ifelse
save} bind def
% *** X1 - Duplex Select (special) ***
% (and handle character string.)
%
% <save> <string> <dpx> X1 <save>
%
% <dpx> 0 Not Duplex
% 1 Duplex
%
% NOTE: On some machines, setduplexmode resets the CTM and position. Also
% on some machines, grestore restores the old duplex mode tray. Thus the
% complex command is necessary for duplex select.
%
% In addition, there appears to be a bug in the HP/Adobe PostScript
% cartridge causes the printer to hang if we change to duplex on an
% odd page. This seems to solve most but not all of these problesm.
%
%
/X1 {exch P
currentpoint 4 -1 roll restore moveto
/statusdict where
{pop statusdict begin
currentpoint matrix currentmatrix 4 -1 roll
$FP not {showpage /$FP true store} if
1 eq {setduplexmode} stopped {pop} if
$T {settumble} stopped {pop} if
setmatrix moveto end}
{pop}
ifelse
save} bind def
% *** O - Set Number of Copies ***
% (and handle character string.)
%
% <save> <string> <copies> O <save>
%
/O {exch P
currentpoint 4 -1 roll restore moveto
/#copies exch store
save} bind def
% EJECT SECTION(Print Functions)
% *** P - String Print ***
% (Force horizontal grid position after each character.)
%
% <string> P -
%
/P {{pop pop currentpoint exch round exch moveto} exch kshow
currentpoint exch round exch moveto} bind def
% *** B - Print Block ***
% Print Block at current position (from top left)
% (and take care of character string.)
%
% <string> <vert> <horz> <dens> B -
%
/B {4 -1 roll P gsave
100 exch sub 100 div setgray
currentpoint newpath moveto
dup 0 rlineto
exch neg 0 exch rlineto
neg 0 rlineto
closepath fill grestore} bind def
% *** G - Grey Level Set ***
% Set grey level (0=white, 100=black)
% (and handle character string.
%
% <save> <string> <dens> G <save>
%
/G {exch P
currentpoint 4 -1 roll restore moveto
100 exch sub 100 div setgray
save} bind def
% *** CO - Color Set ***
% Set CMYK Color (0=white, 1=Full Color)
% (and handle character string.
%
% <save> <string> <cyan> <magenta> <yellow> <black> CO <save>
%
/CO {5 -1 roll P
currentpoint 7 -1 roll restore moveto
{setcmykcolor} stopped {pop pop pop pop} if
save} bind def
% EJECT SECTION(Print Image)
% *** Image Operation ***
% The IS (Image Start) function sets up the stack. Slate then
% builds a HEX image array for one line. Then IE (Image End)
% prints the line of data and positions properly.
% *** IS - Image Start ***
% Setup the stack for subsequent IE call to print a line
% of image data. A row of hex image data in the form:
% {<Hex Data>} should be sent before calling IE.
% (Also take care of character string.)
%
% <string> <bytes> <dots> IS <pixels>
%
/IS {3 -1 roll P
dup currentpoint 2 copy 5 -1 roll sub moveto gsave translate
dup scale 8 mul} bind def
% *** CS - Color Image Start ***
% Setup the stack for subsequent IE call to print a line
% of image data. A row of hex image data in the form:
% {<Hex Data>} should be sent before calling IE.
% (Also take care of character string.)
%
% <string> <bytes> <dots> IS <pixels>
%
/CS {3 -1 roll P
dup currentpoint 2 copy 5 -1 roll sub moveto gsave translate
dup scale 2 mul} bind def
% *** IS2 - Image Start (Non Square) ***
% Setup the stack for subsequent IE call to print a line
% of image data. A row of hex image data in the form:
% {<Hex Data>} should be sent before calling IE.
% (Also take care of character string.)
%
% <string> <bytes> <hdots> <vdots> IS <pixels>
%
/IS2 {4 -1 roll P
dup currentpoint 2 copy 5 -1 roll sub moveto gsave translate
scale 8 mul} bind def
% *** IE - Image End ***
% Print Image data
%
% <pixels> {<Hex data>} IE -
%
/IE {1 1 matrix 4 -1 roll image grestore} bind def
% *** CE - Color Image End ***
% Print Image data
%
% <pixels> {<Hex data>} CE -
%
% <Hex Data> is the CMYK interleaved data
%
/CE {1 1 matrix 4 -1 roll false 4 colorimage grestore} bind def
% EJECT SECTION(Font Functions)
% *** F - Font Select ***
% Set current font and size (in points).
% (and handle character string.)
%
% <save> <string> <size> <font_name> F <save>
%
% This is a bit trickey since PostScript Level 1 objects to the
% font_name object on the stack during the restore. Copy to
% $TMP array in lowest level of VM.
%
/F {3 -1 roll P
$TMP cvs
currentpoint 5 -1 roll restore moveto
findfont exch $H div scalefont
setfont
save
} bind def
% *** FV - Set new Font Encoding Vector (Internal) ***
%
% <vector> <new_name> <old_font> FV <new-font>
%
/FV {dup maxlength dict /$N exch def
{exch dup /FID ne
{dup /Encoding eq
{exch dup length array copy $N 3 1 roll put}
{exch $N 3 1 roll put}
ifelse}
{pop pop}
ifelse}
forall
dup $N /FontName 3 -1 roll put exch aload length 2 idiv
{$N /Encoding get 3 1 roll put}
repeat
$N definefont} bind def
% *** FI - Select IBM-2 Font ***
% Convert Encoding Vector if necessary.
% (and take care of character string.)
%
% <save> <string> <size> <font_name> <i2_name> FI <save>
%
% This is a bit trickey since PostScript Level 1 objects to the
% font_name objects on the stack during the restore. Copy to
% $TMP and $TMP1 arrays in lowest level of VM.
%
/FI {4 -1 roll P
$TMP cvs exch $TMP1 cvs exch
currentpoint 6 -1 roll restore moveto
dup FontDirectory exch known
{findfont exch pop}
{exch findfont $I2 3 1 roll FV}
ifelse
exch $H div scalefont setfont
save} bind def
% *** F8 - Select Roman 8 Font ***
% Convert Encoding Vector if necessary.
% (and take care of character string.)
%
% <string> <size> <font_name> <r8_name> F8
%
% This is a bit trickey since PostScript Level 1 objects to the
% font_name objects on the stack during the restore. Copy to
% $TMP and $TMP1 arrays in lowest level of VM.
%
/F8 {4 -1 roll P
$TMP cvs exch $TMP1 cvs exch
currentpoint 6 -1 roll restore moveto
dup FontDirectory exch known
{findfont exch pop}
{exch findfont $R8 3 1 roll FV}
ifelse
exch $H div scalefont setfont
save} bind def
% *** FW - Select Windows Font ***
% Convert Encoding Vector if necessary.
% (and take care of character string.)
%
% <string> <size> <font_name> <w_name> FW
%
% This is a bit trickey since PostScript Level 1 objects to the
% font_name objects on the stack during the restore. Copy to
% $TMP and $TMP1 arrays in lowest level of VM.
%
/FW {4 -1 roll P
$TMP cvs exch $TMP1 cvs exch
currentpoint 6 -1 roll restore moveto
dup FontDirectory exch known
{findfont exch pop}
{exch findfont $WN 3 1 roll FV}
ifelse
exch $H div scalefont setfont
save} bind def
% *** D - Set Default Font ***
% (and take care of character string.)
%
% <save> <string> D <save>
%
/D {P
currentpoint 3 -1 roll restore moveto
/Courier findfont 12 $H div scalefont setfont
save} bind def
% EJECT SECTION(Final Setup)
%*** Final Setup ***/
%
0 0 moveto
/Courier findfont 12 $H div scalefont setfont
%%EndProlog
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.