home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 October
/
Chip_2002-10_cd1.bin
/
zkuste
/
pdf
/
download
/
gsv43w32.exe
/
gsview
/
gsview32.exe
/
RCDATA
/
951
next >
Wrap
Text File
|
2002-04-30
|
3KB
|
114 lines
/ViewerPreProcess { systemdict begin
dup length dict copy
dup /HWResolution undef
dup /HWMargins undef
dup /Margins undef
dup /Orientation undef
dup /InputAttributes undef
dup /TextAlphaBits undef
dup /GraphicsAlphaBits undef
dup /PageSize undef
GSview /ImagingBBox get null eq
{ GSview dup /PageSize get
/Size exch put
GSview /PageOffset [0 0] put
}
{ GSview dup /ImagingBBox get
[ exch
dup 0 get exch dup 2 get 3 -1 roll sub exch
dup 1 get exch 3 get exch sub
]
/Size exch put
GSview /Orientation get
dup 0 eq
{ % portrait
GSview dup /ImagingBBox get
[ exch dup 0 get neg exch 1 get neg ]
/PageOffset exch put
}
if
dup 1 eq
{ % landscape
GSview dup /ImagingBBox get
[
exch dup 1 get neg exch 2 get
GSview /Size get
0 get
sub
exch neg exch neg
]
/PageOffset exch put
}
if
dup 2 eq
{ % upside-down
GSview dup /ImagingBBox get
[ exch dup 2 get exch 3 get
GSview /Size get
dup 0 get exch 1 get
exch 3 1 roll
sub 3 1 roll
sub exch
]
/PageOffset exch put
}
if
dup 3 eq
{ % seascape
GSview dup /ImagingBBox get
[ exch dup 0 get exch 3 get
GSview /Size get
1 get sub
exch neg
exch neg exch neg
]
/PageOffset exch put
}
if
pop
}
ifelse
dup /DisplayFormat known
{ dup /DisplayFormat get 131072 and 0 eq }
{ matrix defaultmatrix 3 get 0 lt }
ifelse
{flush GSview /PageOffset get dup 1 get neg 1 exch put} if
dup /TextAlphaBits GSview /TextAlphaBits get put
dup /GraphicsAlphaBits GSview /GraphicsAlphaBits get put
dup /PageSize GSview /Size get put
dup /HWResolution GSview /HWResolution get put
dup /PageOffset GSview /PageOffset get put
dup /Orientation GSview /Orientation get put
GSview /ImagingBBox get null eq
{ % create an ImagingBBox from PageSize
dup /ImagingBBox [ 0 0
GSview /PageSize get
dup 0 get exch 1 get ]
put
}
{ % use supplied ImagingBBox
dup /ImagingBBox GSview /ImagingBBox get put
}
ifelse
dup /Policies << /PageSize 5 >> put
dup /InputAttributes <<
0 << /PageSize [
GSview /Orientation get
dup 0 eq
exch 2 eq
or
{ % portrait or upside down
GSview /Size get
dup 0 get exch 1 get
}
{ % landscape or seascape
GSview /Size get
dup 1 get exch 0 get
}
ifelse
]
>>
>> put
end % pop systemdict
}