home *** CD-ROM | disk | FTP | other *** search
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %% %%
- %% statusdict.ps: this file defines all the things that we want to %%
- %% emulate in statusdict. Strictly speaking, a lot of these %%
- %% procedures are only defined if you are driving a device to which %%
- %% they are relevant; however, since TPro lets you switch between %%
- %% arbitrary output devices with arbitrary capabilities, this is %%
- %% probably not what you want. Also, we don't do things like set %%
- %% PageSize policiy to 0 for the paper tray compatibility operators.%%
- %% %%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- statusdict begin
-
- /waittimeout 0 def
- /manualfeedtimeout 0 def
- /jobtimeout 0 def
-
- /revision revision def
-
- /product product def
-
- /jobname () def
-
- /setjobtimeout {pop} def
-
- /printername {
- currentsystemparams /PrinterName get exch copy
- } binddef
-
- /setprintername {
- << /Password () /PrinterName 5 -1 roll >> setsystemparams
- } binddef
-
- /realformat {
- currentsystemparams /RealFormat get
- } binddef
-
- /byteorder {
- currentsystemparams /ByteOrder get
- } binddef
-
- /buildtime {
- currentsystemparams /BuildTime get
- } binddef
-
- /checkpassword {
- systemdict /checkpassword get exec
- } binddef
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %% %%
- %% Page device compatibility operators %%
- %% %%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- /processcolors {
- currentpagedevice /ProcessColorModel get
- dup /DeviceGray eq {1} {
- dup /DeviceRGB eq {3} {4} ifelse
- } ifelse exch pop
- } binddef
-
- /pagecount {
- currentpagedevice
- dup /HWPageCount known {
- /HWPageCount get
- } {
- pop 0
- } ifelse
- } binddef
-
- /setpageparams { %% width height offset orientation => -
- <<
- /PageSize 6 -2 roll
- 4 index 0 eq {exch} if
- 2 array astore
- /Margins [ 7 -1 roll 0 ]
- /Orientation 7 -1 roll 0 eq {3} {0} ifelse
- >> setpagedevice
- } binddef
-
- /pageparams {
- currentpagedevice begin
- PageSize aload pop
- currentdict /Margins known {Margins 0 get} {0} ifelse
- currentdict /Orientation known {
- Orientation 0 eq {1} {0} ifelse
- } {
- 1
- } ifelse
- end
- } binddef
-
- /setpage {
- statusdict begin 0 exch setpageparams end
- } binddef
-
- /setmargins {
- currentpagedevice
- dup /Margins known {
- /Margins get aload pop
- 4 -1 roll sub
- 3 1 roll add
- exch 2 array astore
- << exch /Margins exch >> setpagedevice
- } {
- pop pop
- } ifelse
- } binddef
-
- /setresolution {
- << /HWResolution [ 4 -1 roll dup ] >> setpagedevice
- } binddef
-
- /resolution {
- currentpagedevice /HWResolution get 0 get
- } binddef
-
- /setmirrorprint {
- << exch /MirrorPrint exch >> setpagedevice
- } binddef
-
- /mirrorprint {
- currentpagedevice /MirrorPrint get
- } binddef
-
- /setpagestackorder {
- << exch /OutputFaceUp exch not >> setpagedevice
- } binddef
-
- /pagestackorder {
- currentpagedevice /OutputFaceUp get not
- } binddef
-
- /setaccuratescreens {
- << exch /AccurateScreens exch >> setuserparams
- } binddef
-
- /accuratescreens {
- currentuserparams /AccurateScreens get
- } binddef
-
- /checkscreen {
- systemdict /checkscreen get exec
- } binddef
-
- /setpagemargin {
- [ exch 0 ]
- << exch /PageOffset exch >> setpagedevice
- } binddef
-
- /pagemargin {
- currentpagedevice /PageOffset get 0 get
- } binddef
-
- /duplexmode {
- currentpagedevice /Duplex known {
- currentpagedevice /Duplex get
- } {
- false
- } ifelse
- } binddef
-
- /firstside {
- currentpagedevice /Duplex known {
- currentpagedevice /FirstSide get
- } {
- true
- } ifelse
- } binddef
-
- /newsheet {
- duplex firstside not and {showpage} if
- } binddef
-
- /setduplexmode {
- dup currentpagedevice /Duplex known or {
- << exch /Duplex exch >> setpagedevice
- } {
- pop
- } ifelse
- } binddef
-
- /settumble {
- dup currentpagedevice /Tumble known or {
- << exch /Tumble exch >> setpagedevice
- } {
- pop
- } ifelse
- } binddef
-
- /tumble {
- currentpagedevice /Tumble known {
- currentpagedevice /Tumble get
- } {
- false
- } ifelse
- } binddef
-
- /manualfeed {
- << exch /ManualFeed exch >> setpagedevice
- } binddef
-
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %% %%
- %% Paper tray compatibility operators. %%
- %% %%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- /lettertray {<</PageSize [612 792] /ImagingBBox null>> setpagedevice} binddef
- /legaltray {<</PageSize [612 1008] /ImagingBBox null>> setpagedevice} binddef
- /ledgertray {<</PageSize [1224 792] /ImagingBBox null>> setpagedevice} binddef
- /11x17tray {<</PageSize [792 1224] /ImagingBBox null>> setpagedevice} binddef
- /a3tray {<</PageSize [842 1191] /ImagingBBox null>> setpagedevice} binddef
- /a4tray {<</PageSize [595 842] /ImagingBBox null>> setpagedevice} binddef
- /b5tray {<</PageSize [499 709] /ImagingBBox null>> setpagedevice} binddef
-
-
- end
-