home *** CD-ROM | disk | FTP | other *** search
/ OneVision 3.03 / OneVision3.03.iso / Apps / OneVision.app / TMSPrintingPackage.1Vsys / OVPrintingPackage.procset < prev    next >
Encoding:
Text File  |  1996-11-12  |  19.5 KB  |  669 lines

  1. %!
  2. %%Title: (1VISION (R) Printing Package)
  3. %%Version: 2.0 
  4. %%Copyright: ((C) OneVision GmbH, Regensburg All Rights Reserved)
  5.  
  6. systemdict /languagelevel known {languagelevel 2 ge} {false} ifelse not
  7. {    userdict maxlength
  8.     userdict length
  9.     sub 200 lt
  10.     {
  11.         /userdictextended 200 dict  def
  12.         userdictextended begin 
  13.     }
  14.     if
  15. }
  16. if 
  17.  
  18. /setpacking where {pop} {/setpacking {pop} bind def /currentpacking {false} def} ifelse
  19. currentpacking true setpacking
  20.  
  21. /packedarray where {pop} {/packedarray {array astore} bind def} ifelse
  22.  
  23. /hardbind where
  24. {pop}
  25. {    /isarray {type dup /arraytype eq exch /packedarraytype eq or} bind def
  26.     /hardbind
  27.     {    dup xcheck exch mark exch
  28.         {    dup type /marktype eq
  29.             {pop {mark} aload pop}
  30.             {    dup xcheck
  31.                 {    dup type /nametype eq
  32.                     {dup where {exch get dup xcheck {dup isarray {{exec} aload pop} if} if} if}
  33.                     {dup isarray {hardbind} if}
  34.                     ifelse
  35.                 } if
  36.             }
  37.             ifelse
  38.         } forall
  39.         counttomark packedarray exch pop exch {cvx} if
  40.     } bind def
  41. } ifelse
  42.  
  43. /numcolorspaceComponents 8 dict def
  44. numcolorspaceComponents begin
  45. /DeviceGray 1 def
  46. /DeviceRGB 3 def
  47. /DeviceCMYK 4 def
  48. /CIEBasedABC 3 def
  49. /CIEBasedA 1 def
  50. /Pattern 1 def
  51. /Indexed 1 def
  52. /Separation 1 def
  53. end
  54.  
  55. /loadimageparams
  56. {    begin {/Width /Height /BitsPerComponent /ImageMatrix /DataSource} {load} forall
  57.     currentdict /MultipleDataSources known {/MultipleDataSources load} {false} ifelse
  58.     {aload pop true} {false} ifelse end
  59. } hardbind def
  60.  
  61. /_TMSExtGstate where {pop true} {false} ifelse
  62. systemdict /languagelevel known {languagelevel 2 ge} {false} ifelse or
  63. {userdict /undoSaveToken save put} if
  64.  
  65. /_TMSExtGstate 4 dict def
  66. _TMSExtGstate begin
  67. /gsavelevel 0 def
  68. /neededslots 9 def
  69. /setblackgeneration where {pop} {/neededslots neededslots 2 add def} ifelse
  70. /stack [10 {neededslots array} repeat] def
  71. end
  72. /_currentextgstatearr
  73. {    _TMSExtGstate /stack get _TMSExtGstate /gsavelevel get get
  74. } hardbind def
  75. /gsave
  76. {    gsave
  77.     _currentextgstatearr
  78.     _TMSExtGstate /gsavelevel _TMSExtGstate /gsavelevel get 1 add put
  79.     _TMSExtGstate /stack get length _TMSExtGstate /gsavelevel get le
  80.     {    _TMSExtGstate /stack get dup length 10 add array
  81.         _TMSExtGstate /stack 2 index put copy pop
  82.         _TMSExtGstate /stack get dup length 10 sub _TMSExtGstate /neededslots get
  83.         10 {3 copy array put exch 1 add exch} repeat
  84.         pop pop pop
  85.     } if
  86.     _currentextgstatearr copy pop
  87. } hardbind def
  88. /grestore
  89. {    _TMSExtGstate /gsavelevel _TMSExtGstate /gsavelevel get 1 sub put
  90.     grestore
  91. } hardbind def
  92.  
  93. /currentcolorspace
  94. {    _currentextgstatearr 0 get
  95. } hardbind def
  96. /setcolorspace
  97. {    dup type /arraytype ne {_currentextgstatearr 1 1 getinterval dup 0 4 -1 roll put} if
  98.     _currentextgstatearr 0 3 -1 roll put
  99.     _currentextgstatearr 2 null put
  100.     0 0 0 0 _currentextgstatearr 5 4 getinterval astore pop
  101. } hardbind def
  102.  
  103. /setblackgeneration where
  104. {pop}
  105. {    /setblackgeneration {_currentextgstatearr 9 3 -1 roll put} hardbind def
  106.     /currentblackgeneration {_currentextgstatearr 9 get} hardbind def
  107.     /setundercolorremoval {_currentextgstatearr 10 3 -1 roll put} hardbind def
  108.     /currentundercolorremoval {_currentextgstatearr 10 get} hardbind def
  109.     {} setblackgeneration
  110.     {} setundercolorremoval
  111. }
  112. ifelse
  113.  
  114. /setcmykcolor where {pop /currentcmykcolor where} {false} ifelse
  115. {pop}
  116. {    /setcmykcolor
  117.     {    4 copy _currentextgstatearr 5 4 getinterval astore pop
  118.         4 1 roll
  119.         3 {3 index add dup 1 gt {pop 1} if 1 exch sub 3 1 roll} repeat
  120.         setrgbcolor pop
  121.     } hardbind def
  122.     /currentcmykcolor
  123.     {    currentcolorspace 0 get /DeviceCMYK eq
  124.         {_currentextgstatearr 5 4 getinterval aload pop}
  125.         {0 0 0 0}
  126.         ifelse
  127.     } hardbind def
  128. }
  129. ifelse
  130.  
  131. /setoverprint where {pop /currentoverprint where} {false} ifelse
  132. {pop}
  133. {    /setoverprint {_currentextgstatearr 3 3 -1 roll put} hardbind def
  134.     /currentoverprint {_currentextgstatearr 3 get} hardbind def
  135. } ifelse
  136. false setoverprint
  137.  
  138. /currenthalftone {_currentextgstatearr 4 get} hardbind def
  139. /setcolorscreen where {pop /currentcolorscreen where} {false} ifelse
  140. {    pop
  141.     /sethalftone
  142.     {    _currentextgstatearr 4 3 -1 roll put
  143.         {    {{/Frequency /Angle /SpotFunction} {currenthalftone exch get} forall setscreen
  144.              currenthalftone /TransferFunction known
  145.              {currenthalftone /TransferFunction get settransfer} if}
  146.             {{/RedFrequency /RedAngle /RedSpotFunction
  147.               /GreenFrequency /GreenAngle /GreenSpotFunction
  148.               /BlueFrequency /BlueAngle /BlueSpotFunction
  149.               /GrayFrequency /GrayAngle /GraySpotFunction
  150.              } {currenthalftone exch get} forall
  151.              setcolorscreen
  152.              currenthalftone /RedTransferFunction known
  153.              {{/RedTransferFunction /GreenTransferFunction
  154.                /BlueTransferFunction /GrayTransferFunction
  155.               } {currenthalftone exch get} forall
  156.               setcolortransfer
  157.              } if
  158.             }
  159.             {}
  160.             {}
  161.             {currenthalftone /Default get /sethalftone cvx exec}
  162.         }
  163.         currenthalftone /HalftoneType get 1 sub get exec
  164.     } hardbind def
  165.     13 dict begin
  166.     /HalftoneType 2 def
  167.     currentcolorscreen
  168.     /GraySpotFunction exch def /GrayAngle exch def /GrayFrequency exch def
  169.     /BlueSpotFunction exch def /BlueAngle exch def /BlueFrequency exch def
  170.     /GreenSpotFunction exch def /GreenAngle exch def /GreenFrequency exch def
  171.     /RedSpotFunction exch def /RedAngle exch def /RedFrequency exch def
  172.     currentdict end sethalftone
  173. }
  174. {    /sethalftone
  175.     {    _currentextgstatearr 4 3 -1 roll put
  176.         {    {{/Frequency /Angle /SpotFunction} {currenthalftone exch get} forall setscreen
  177.              currenthalftone /TransferFunction known
  178.              {currenthalftone /TransferFunction get settransfer} if}
  179.             {{/GrayFrequency /GrayAngle /GraySpotFunction} {currenthalftone exch get} forall
  180.              setscreen
  181.              currenthalftone /GrayTransferFunction known
  182.              {currenthalftone /GrayTransferFunction get settransfer} if
  183.             }
  184.             {}
  185.             {}
  186.             {currenthalftone /Default get /sethalftone cvx exec}
  187.         }
  188.         currenthalftone /HalftoneType get 1 sub get exec
  189.     } hardbind def
  190.     4 dict begin
  191.     /HalftoneType 1 def
  192.     currentscreen /SpotFunction exch def /Angle exch def /Frequency exch def
  193.     currentdict end sethalftone
  194.     /setcolortransfer
  195.     {    settransfer
  196.         3 {pop} repeat
  197.     } hardbind def
  198. }
  199. ifelse
  200. /setscreen
  201. {    4 dict begin
  202.     /HalftoneType 1 def
  203.     /SpotFunction exch def /Angle exch def /Frequency exch def
  204.     currentdict end sethalftone
  205. } hardbind def
  206. /setcolorscreen
  207. {    13 dict begin
  208.     /HalftoneType 2 def
  209.     /GraySpotFunction exch def /GrayAngle exch def /GrayFrequency exch def
  210.     /BlueSpotFunction exch def /BlueAngle exch def /BlueFrequency exch def
  211.     /GreenSpotFunction exch def /GreenAngle exch def /GreenFrequency exch def
  212.     /RedSpotFunction exch def /RedAngle exch def /RedFrequency exch def
  213.     currentdict end sethalftone
  214. } hardbind def
  215.  
  216. /setcolorrendering {pop} bind def
  217.  
  218. /currentcolorDict 8 dict def
  219. currentcolorDict begin
  220. /DeviceGray {currentgray} def
  221. /DeviceRGB {currentrgbcolor} def
  222. /DeviceCMYK {currentcmykcolor} def
  223. /CIEBasedABC {0 0 0} def
  224. /CIEBasedA {0} def
  225. /Pattern
  226. {    _currentextgstatearr 2 get
  227.     /PaintType get 2 eq
  228.     {currentcolorDict currentcolorspace 1 get dup type /arraytype eq {0 get} if get exec} if
  229.     _currentextgstatearr 2 get
  230. } def
  231. /Indexed {_currentextgstatearr 5 get} def
  232. /Separation {_currentextgstatearr 5 get} def
  233. end
  234. currentcolorDict {hardbind currentcolorDict 3 1 roll put} forall
  235. /currentcolor
  236. {    currentcolorDict currentcolorspace 0 get get exec
  237. } hardbind def
  238.  
  239. /currentcolorspaceNoPattern
  240. {    currentcolorspace dup 0 get /Pattern eq {1 get} if
  241. } hardbind def
  242. /setcolorDict 8 dict def
  243. setcolorDict begin
  244. /DeviceGray {setgray} def
  245. /DeviceRGB {setrgbcolor} def
  246. /DeviceCMYK {setcmykcolor} def
  247. /CIEBasedABC {pop pop pop 0.5 setgray} def
  248. /CIEBasedA {pop 0.5 setgray} def
  249. /Pattern
  250. {    dup _currentextgstatearr 2 3 -1 roll put
  251.     /PaintType get 2 eq
  252.     {setcolorDict currentcolorspace 1 get dup type /arraytype eq {0 get} if get exec} if
  253. } def
  254. /Indexed
  255. {    dup currentcolorspaceNoPattern 3 get dup xcheck {exec}
  256.     {exch numcolorspaceComponents currentcolorspace 1 get dup type /arraytype eq {0 get} if get
  257.      exch 1 index mul exch getinterval {255 div} forall} ifelse
  258.     setcolorDict currentcolorspaceNoPattern 1 get dup type /arraytype eq {0 get} if get exec
  259.     _currentextgstatearr 5 3 -1 roll put
  260. } def
  261. /Separation
  262. {    dup currentcolorspaceNoPattern 3 get exec
  263.     setcolorDict currentcolorspaceNoPattern 2 get dup type /arraytype eq {0 get} if get exec
  264.     _currentextgstatearr 5 3 -1 roll put
  265. } def
  266. end
  267. setcolorDict {hardbind setcolorDict 3 1 roll put} forall
  268. /setcolor
  269. {    setcolorDict currentcolorspace 0 get get exec
  270. } hardbind def
  271. /setgray
  272. {    /DeviceGray setcolorspace setcolor
  273. } hardbind def
  274. /setrgbcolor
  275. {    /DeviceRGB setcolorspace setcolor
  276. } hardbind def
  277. /sethsbcolor
  278. {    systemdict begin gsave sethsbcolor currentrgbcolor grestore end
  279.     setrgbcolor
  280. } def
  281. /setcmykcolor
  282. {    /DeviceCMYK setcolorspace setcolor
  283. } hardbind def
  284. /setpattern
  285. {    currentcolorspace 0 get /Pattern ne
  286.     {[/Pattern currentcolorspace] setcolorspace} if
  287.     setcolor
  288. } hardbind def
  289. %%/nxsetgray /setgray load def
  290. %%/nxsetrgbcolor /setrgbcolor load def
  291. 1 setgray
  292.  
  293. /patternfill
  294. {    gsave
  295.     initmatrix {pathbbox} stopped {0 0 0 0} if 3 -1 roll sub 3 1 roll sub 0 ne exch 0 ne and
  296.     grestore
  297.     {    gsave
  298.         {eoclip} {clip} ifelse
  299.         gsave
  300.         clippath initmatrix {pathbbox} stopped
  301.         {false} {3 -1 roll sub 3 1 roll sub 0 ne exch 0 ne and} ifelse
  302.         grestore
  303.         {    currentcolor begin
  304.             /PaintType load 2 eq
  305.             {currentcolorspace 1 get setcolorspace setcolor}
  306.             {1 setgray}
  307.             ifelse
  308.             /Implementation load dup /PatternMatrix get setmatrix setfont
  309.             flattenpath pathbbox newpath
  310.             2 index sub /YStep load div
  311.             exch 3 index sub /XStep load div exch
  312.             2 {abs 1 add cvi 1 add exch} repeat
  313.             4 2 roll
  314.             /YStep load abs dup 3 1 roll div floor exch mul exch
  315.             /XStep load abs dup 3 1 roll div floor exch mul exch
  316.             moveto
  317.             exch 19 add 20 idiv exch
  318.             /YStep load
  319.             end
  320.             3 1 roll
  321.             {    currentpoint
  322.                 2 index
  323.                 {(aaaaaaaaaaaaaaaaaaaa) show} repeat
  324.                 3 index add moveto
  325.             } repeat
  326.             pop pop
  327.         } if
  328.         grestore
  329.     }
  330.     {pop}
  331.     ifelse
  332.     newpath
  333. } hardbind def
  334. /makepattern
  335. {    exch dup length 1 add dict copy begin
  336.     matrix currentmatrix dup concatmatrix
  337.     currentdict
  338.     11 dict begin
  339.     /PatternDict exch def
  340.     /PatternMatrix exch def
  341.     /FontType 3 def
  342.     /FontMatrix [1 0 0 1 0 0] def
  343.     /FontBBox /BBox load def
  344.     /Encoding 256 array def
  345.     0 1 255 {/Encoding load exch /.notdef put} for
  346.     /Encoding load (a) 0 get /PaintProc put
  347.     /.notdef {pop} def
  348.     /PaintProc /PaintProc load def
  349.     /BuildChar
  350.     {    1 index /Encoding get exch get
  351.         1 index /BuildGlyph get exec
  352.     } def
  353.     /BuildGlyph
  354.     {    exch begin
  355.         /PatternDict load /XStep get 0
  356.         /PatternDict load /PaintType get 1 eq
  357.         {setcharwidth} {/FontBBox load aload pop setcachedevice}
  358.         ifelse
  359.         load /PatternDict load exch
  360.         end
  361.         exec
  362.     } def
  363.     currentdict end
  364.     /_TMSPatternTmpFontName exch definefont 1 scalefont
  365.     /Implementation exch def
  366.     currentdict end readonly
  367. } bind def
  368. /fill
  369. {    currentcolorspace 0 get /Pattern ne
  370.     {fill}
  371.     {false patternfill}
  372.     ifelse
  373. } hardbind def
  374. /eofill
  375. {    currentcolorspace 0 get /Pattern ne
  376.     {eofill}
  377.     {true patternfill}
  378.     ifelse
  379. } hardbind def
  380. /stroke
  381. {    currentcolorspace 0 get /Pattern ne
  382.     {stroke}
  383.     {strokepath false patternfill}
  384.     ifelse
  385. } hardbind def
  386. /patternshow
  387. {    gsave
  388.     currentpoint newpath moveto true charpath currentpoint
  389.     false patternfill
  390.     grestore moveto
  391. } hardbind def
  392. /show
  393. {    currentcolorspace 0 get /Pattern ne
  394.     {show}
  395.     {patternshow}
  396.     ifelse
  397. } hardbind def
  398. userdict /_TMSTmpString ( ) put
  399. /ashow
  400. {    currentcolorspace 0 get /Pattern ne
  401.     {ashow}
  402.     {    {    _TMSTmpString exch 0 exch put _TMSTmpString patternshow
  403.             2 copy rmoveto
  404.         } forall
  405.         2 {pop} repeat
  406.     }
  407.     ifelse
  408. } hardbind def
  409. /widthshow
  410. {    currentcolorspace 0 get /Pattern ne
  411.     {widthshow}
  412.     {    {    dup _TMSTmpString exch 0 exch put _TMSTmpString patternshow
  413.             1 index eq {2 {2 index} repeat rmoveto} if
  414.         } forall
  415.         3 {pop} repeat
  416.     }
  417.     ifelse
  418. } hardbind def
  419. /awidthshow
  420. {    currentcolorspace 0 get /Pattern ne
  421.     {awidthshow}
  422.     {    {    _TMSTmpString exch 0 exch put _TMSTmpString patternshow
  423.             2 copy rmoveto
  424.             2 index _TMSTmpString 0 get eq {2 {4 index} repeat rmoveto} if
  425.         } forall
  426.         5 {pop} repeat
  427.     }
  428.     ifelse
  429. } hardbind def
  430. /kshow
  431. {    currentcolorspace 0 get /Pattern ne
  432.     {kshow}
  433.     {    dup 0 get
  434.         _TMSTmpString exch 0 exch put
  435.         _TMSTmpString patternshow
  436.         dup length 1 gt
  437.         {    1 1 index length 1 sub getintervall
  438.             {    _TMSTmpString 0 get exch
  439.                 dup _TMSTmpString exch 0 exch put
  440.                 {3 index exec}
  441.                 _TMSTmpString patternshow
  442.             } forall
  443.         }
  444.         {pop}
  445.         ifelse
  446.         pop
  447.     }
  448.     ifelse
  449. } hardbind def
  450.  
  451. /colorimageDict 12 dict def
  452. colorimageDict begin
  453. /DeviceGray {loadimageparams pop image} hardbind def
  454. /DeviceRGB {loadimageparams 3 colorimage} hardbind def
  455. /DeviceCMYK {loadimageparams 4 colorimage} hardbind def
  456. /CIEBasedABC {loadimageparams 3 _NXDoImageOp} hardbind def
  457. /CIEBasedA {loadimageparams 1 _NXDoImageOp} hardbind def
  458. /Pattern {/image errordict /undefined get exec} def
  459. /imageprocedures
  460. [
  461. {    laststringarr 0 get dup length 0 eq {pop datasrc} if
  462.     dup length 4 mul numcomponents2 mul dup 65535 gt
  463.     {    pop 65535 numcomponents2 idiv 4 idiv 2 copy 0 exch getinterval 3 1 roll
  464.         1 index length 1 index sub getinterval laststringarr 0 3 -1 roll put
  465.         dup length 4 mul numcomponents2 mul
  466.     }
  467.     {laststringarr 0 () put}
  468.     ifelse
  469.     indexedimageworkstring 0 3 -1 roll getinterval 0 3 -1 roll
  470.     {    3 1 roll
  471.         4
  472.         {    2 index 192 and -6 bitshift
  473.             lookupstring exch numcomponents2 mul numcomponents2 getinterval
  474.             3 copy putinterval pop numcomponents2 add
  475.             3 -1 roll 2 bitshift 3 1 roll
  476.         } repeat
  477.         3 -1 roll pop
  478.     } forall pop
  479. }
  480. {    laststringarr 0 get dup length 0 eq {pop datasrc} if
  481.     dup length 2 mul numcomponents2 mul dup 65535 gt
  482.     {    pop 65535 numcomponents2 idiv 2 idiv 2 copy 0 exch getinterval 3 1 roll
  483.         1 index length 1 index sub getinterval laststringarr 0 3 -1 roll put
  484.         dup length 2 mul numcomponents2 mul
  485.     }
  486.     {laststringarr 0 () put}
  487.     ifelse
  488.     indexedimageworkstring 0 3 -1 roll getinterval 0 3 -1 roll
  489.     {    3 1 roll 2 index -4 bitshift
  490.         lookupstring exch numcomponents2 mul numcomponents2 getinterval
  491.         3 copy putinterval pop numcomponents2 add
  492.         3 -1 roll 15 and
  493.         lookupstring exch numcomponents2 mul numcomponents2 getinterval
  494.         3 copy putinterval pop numcomponents2 add
  495.     } forall pop
  496. }
  497. null
  498. {    laststringarr 0 get dup length 0 eq {pop datasrc} if
  499.     dup length numcomponents2 mul dup 65535 gt
  500.     {    pop 65535 numcomponents2 idiv 2 copy 0 exch getinterval 3 1 roll
  501.         1 index length 1 index sub getinterval laststringarr 0 3 -1 roll put
  502.         dup length numcomponents2 mul
  503.     }
  504.     {laststringarr 0 () put}
  505.     ifelse
  506.     indexedimageworkstring 0 3 -1 roll getinterval 0 3 -1 roll
  507.     {    lookupstring exch numcomponents2 mul numcomponents2 getinterval
  508.         3 copy putinterval pop numcomponents2 add
  509.     } forall pop
  510. }
  511. ] def
  512. /fillLookupString
  513. {    lookupstring 0 
  514.     0 1 maximgval
  515.     {    decodescale mul decodemin add {lookup} 0 get dup xcheck
  516.         {exec} {cvi exch numcomponents mul numcomponents getinterval {255 div} forall} ifelse
  517.         convproc
  518.         numcomponents2 {numcomponents2 -1 roll 255 mul round cvi numcomponents2 2 add -2 roll
  519.          2 copy 1 add numcomponents2 4 add 2 roll 2 index put} repeat
  520.         numcomponents2 {pop} repeat
  521.     } for pop pop
  522. } def
  523. /identityLookupStrings [4 string 0 1 3 {dup 85 mul 3 copy put pop pop} for
  524.                                 16 string 0 1 15 {dup 17 mul 3 copy put pop pop} for
  525.                                 null
  526.                                 256 string 0 1 255 {dup 3 copy put pop pop} for] def
  527. /indexedimagelocalvars 11 dict def
  528. indexedimagelocalvars begin
  529. /lookupstring 256 4 mul string def
  530. /laststringarr 1 array def
  531. /indexedimageworkstring 65535 string def
  532. end
  533. /Indexed
  534. {    gsave begin currentdict loadimageparams pop
  535.     2 index 1 eq
  536.     {    3 -1 roll pop false 3 1 roll
  537.         /Decode load 0 get setcolor pop {( )} dup 0 get 0 0 put imagemask
  538.         currentdict loadimageparams pop 3 -1 roll pop true 3 1 roll
  539.         /Decode load 1 get setcolor {imagemask}
  540.     }
  541.     {    indexedimagelocalvars begin
  542.         /maximgval 2 /BitsPerComponent load exp 1 sub cvi def
  543.         /datasrc exch def
  544.         /numcomponents numcolorspaceComponents currentcolorspace dup 0 get /Indexed eq
  545.                             {1} {2} ifelse get dup type /arraytype eq {0 get} if get def
  546.         {colorimage} 0 get type /nametype ne
  547.         {    /numcomponents2 /numcomponents load def
  548.             /convproc {} def
  549.         }
  550.         {    /numcomponents2 1 def
  551.             /convproc /numcomponents load dup 1 eq {pop {}}
  552.                         {3 eq {{.11 mul exch .59 mul add exch .3 mul add}}
  553.     {{exch .11 mul add exch .59 mul add exch .3 mul add dup 1 gt {0} {1 exch sub} ifelse}} ifelse
  554.                         } ifelse def
  555.         } ifelse
  556.         /decodescale /Decode load aload pop exch sub maximgval div def
  557.         /decodemin /Decode load 0 get def
  558.         /lookup currentcolorspace 3 get def
  559.         colorimageDict /fillLookupString get hardbind exec
  560.         /numcomponents2 load 1 eq
  561.         {    /lookupstring load 0 /maximgval load 1 add getinterval
  562.             identityLookupStrings /BitsPerComponent load 2 idiv 1 sub get eq
  563.         }
  564.         {false} ifelse
  565.         {/datasrc load}
  566.         {    /laststringarr load 0 () put exch pop 8 exch
  567.             imageprocedures /BitsPerComponent load 2 idiv 1 sub get hardbind
  568.             /BitsPerComponent load 8 ne
  569.             {    matrix currentmatrix 2 index concat
  570.                 newpath 0 0 moveto 5 index 0 rlineto 0 5 index rlineto 5 index neg 0 rlineto clip
  571.                 setmatrix
  572.                 5 -1 roll /BitsPerComponent load 2 eq {3 add 4 idiv 4 mul} {1 add 2 idiv 2 mul} ifelse
  573.                 5 1 roll
  574.             } if
  575.         }
  576.         ifelse
  577.         false /numcomponents2 load dup 1 eq {pop pop    {image}} {{colorimage}} ifelse end
  578.     }
  579.     ifelse
  580.     end exec grestore
  581. } hardbind def
  582. /Separation /Indexed load def
  583. end
  584. /image
  585. {    dup type /dicttype eq {dup /ImageType get 1 eq} {false} ifelse
  586.     {colorimageDict currentcolorspace 0 get get exec} {image} ifelse
  587. } hardbind def
  588. /NXCalibratedRGBColorSpace /DeviceRGB def
  589.  
  590. /setoverfill {pop} def
  591.  
  592. userdict /undoSaveToken known {userdict /undoSaveToken get restore} if
  593.  
  594. /xycharpath
  595. {    2 index length 2 index length ne
  596.     {    0 1 4 index length 1 sub
  597.         {    currentpoint 5 index 3 index 1 getinterval 4 index charpath
  598.             4 index 3 index 2 mul 1 add get add exch
  599.             4 index 3 index 2 mul get add exch moveto pop
  600.         } for
  601.     }
  602.     {    0 1 4 index length 2 idiv 1 sub
  603.         {    currentpoint 5 index 3 index 2 mul 2 getinterval 4 index charpath
  604.             4 index 3 index 2 mul 1 add get add exch
  605.             4 index 3 index 2 mul get add exch moveto pop
  606.         } for
  607.     }
  608.     ifelse
  609.     pop pop pop
  610. } bind def
  611. /setcustomcolor where
  612. {pop}
  613. {    /findcmykcustomcolor {5 packedarray} bind def
  614.     /setcustomcolor
  615.     {    mark {_1VCustomColors 3 index 4 get cvn get exch pop} stopped
  616.         {cleartomark [/Indexed /DeviceCMYK 4095 [4095 /div cvx 8 index aload pop pop
  617.                             4 {4 index mul 4 1 roll} /repeat cvx 5 -1 /roll cvx /pop cvx] cvx bind]} if
  618.         setcolorspace
  619.         currentcolorspace 0 get /Indexed eq {currentcolorspace 2 get mul round cvi} if setcolor pop
  620.     } def
  621. } ifelse
  622. /customcolorimage where
  623. {pop}
  624. {    /sharedcustomcolorimagedict 8 dict def
  625.     /customcolorimage
  626.     {    gsave 1 setcustomcolor
  627.         currentcolorspace 0 get /DeviceCMYK eq
  628.         {[/Indexed /DeviceCMYK 4095 [4095 /div cvx currentcolor 4 {4 index mul 4 1 roll} /repeat cvx
  629.             5 -1 /roll cvx /pop cvx] cvx bind] setcolorspace 4095 setcolor
  630.         } if
  631.         sharedcustomcolorimagedict begin
  632.         [currentcolorspace 0 get /Indexed eq {currentcolorspace 2 get} {1} ifelse 0] false 1
  633.         {/ImageType /MultipleDataSources /Decode /DataSource /ImageMatrix /BitsPerComponent
  634.          /Height /Width} {exch def} forall currentdict end image grestore
  635.     } def
  636. } ifelse
  637. systemdict /nextimage known not
  638. % systemdict /languagelevel known {languagelevel 2 ge} {false} ifelse and
  639. {
  640. % xyshow causes problems on many Level2 RIPs; seems to be in conjunction with certain fonts
  641.     /xyshow
  642.     {    1 index length 1 index length ne
  643.         {    0 1 3 index length 1 sub
  644.             {    currentpoint 4 index 3 index 1 getinterval show
  645.                 3 index 3 index 2 mul 1 add get add exch
  646.                 3 index 3 index 2 mul get add exch moveto pop
  647.             } for
  648.         }
  649.         {    0 1 3 index length 2 idiv 1 sub
  650.             {    currentpoint 4 index 3 index 2 mul 2 getinterval show
  651.                 3 index 3 index 2 mul 1 add get add exch
  652.                 3 index 3 index 2 mul get add exch moveto pop
  653.             } for
  654.         }
  655.         ifelse
  656.         pop pop
  657.     } hardbind def
  658.     statusdict /product get (Lino) anchorsearch {pop pop true}{pop false} ifelse
  659.     {
  660. % in some weired cases closepath returns a rangecheck-error in Lino Level2 RIPs
  661.         /systemdict dup load dup length dict copy def
  662.         systemdict begin
  663.         /setbbox {pop pop pop pop} bind def
  664.         end
  665.     } if
  666. } if
  667. /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
  668. setpacking
  669.