home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 April
/
PCWorld_2001-04_cd.bin
/
Software
/
Vyzkuste
/
gs
/
gsv36w32.exe
/
gsview
/
gsview32.exe
/
RCDATA
/
951
next >
Wrap
Text File
|
2000-12-28
|
3KB
|
109 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 /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
}