home *** CD-ROM | disk | FTP | other *** search
- %!
- %%VMusage: 0 0
- %%VMlocation: global
- %%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %% %%
- %% OPIProcSet: procedures to go into CommentDict to enable basic %%
- %% OPI processing, for OPI version 2.0. This procset should be able %%
- %% to handle both version 1 and version 2 comments as well as files %%
- %% that include both. %%
- %% %%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
- /OPI2.0ProcSet <<
-
- /Initialise {
- userdict /OPIinitialised? known {
- userdict /OPIinitialised? get
- } {
- false
- } ifelse
- not {
- currentglobal false setglobal
- userdict /OPIdocomment {
- exch OPIdict 3 1 roll put
- } put
- userdict /OPIdoobject_v1 {
- /OPI2.0ProcSet /ProcSet findresource begin DoObject_v1 end
- } put
- userdict /OPIdoobject_v2 {
- /OPI2.0ProcSet /ProcSet findresource begin DoObject_v2 end
- } put
- userdict /OPIdict 8 dict put
- userdict /OPIinitialised? true put
- setglobal
- } if
- } bind
-
- /CommentDict <<
- /ALDImageFileName {/ALDImageFileName OPIdocomment}
- /ALDImageID {/ALDImageID OPIdocomment}
- /ALDImageCropRect {/ALDImageCropRect OPIdocomment}
- /ALDImagePosition {/ALDImagePosition OPIdocomment}
- /ALDImageColor {/ALDImageColor OPIdocomment}
- /ALDImageTint {/ALDImageTint OPIdocomment}
- /ALDImageTransparency {/ALDImageTransparency OPIdocomment}
- /ALDImageGrayMap {/ALDImageGrayMap OPIdocomment}
- /BeginObject {pop OPIdoobject_v1}
- /ImageFileName {/ALDImageFileName OPIdocomment}
- /MainImage {/MainImage OPIdocomment}
- /ImageDimensions {/ImageDimensions OPIdocomment}
- /ImageCropRect {/ALDImageCropRect OPIdocomment}
- /ImageInks {/ImageINks OPIdocomment}
- /BeginIncludedImage {pop OPIdoobject_v2}
- >>
-
- /DoObject_v1 {
- 2 dict begin
- /opi_junk 2048 string def
- userdict /OPIdict get dup /ALDImageFileName known
- exch /ALDImageID known or {
- currentfile opi_junk {readline} stopped {
- pop
- } {
- pop
- /opi_nextline exch def
- opi_nextline (%%BeginOPI: 2.0) eq {
- userdict /OPIdict get dup {pop 1 index exch undef} forall
- /OPI2 true put
- } {
- userdict /OPIdict get {OPI_image} stopped {
- (%%[ OPI substitution failed; using low resolution image ]%%) = flush
- pop
- opi_nextline 0 get 16#25 ne {
- opi_nextline end cvx exec
- 1 dict begin
- } if
- } {
- {
- currentfile opi_junk {readline} stopped {
- pop pop
- } {
- not {stop} if
- (%%EndObject) eq {exit} if
- } ifelse
- } loop
- } ifelse
- } ifelse
- } ifelse
- } if
- end
- } bind
-
- /DoObject_v2 {
- 2 dict begin
- /opi_junk 2048 string def
- userdict /OPIdict get dup /ALDImageFileName known exch /MainImage known or {
- userdict /OPIdict get {OPI_image} stopped {
- (%%[ OPI substitution failed; using low resolution image ]%%) = flush
- pop
- } {
- {
- currentfile opi_junk {readline} stopped {
- pop pop
- } {
- not {stop} if
- (%%EndOPI) eq {exit} if
- } ifelse
- } loop
- } ifelse
- } if
- end
- } bind
-
- >> /ProcSet defineresource
-
- dup /Initialise get exec
-
-