We create printfiles by gluing ps and eps files together and overlay data to print customer forms.. and then send those files to the printer.
As printers have changed we have had to adjust the scripts.. We are now looking at XEROX printers and they are very different animals..
We've built a procedure that sets the tray to print from and it needs a change..
/stray
{
/Pagedv exch def
#ifdef :OK431
/DriverOps /ProcSet 2 copy resourcestatus{pop pop findresource Pagedv exch /setinputslot get exec}{pop pop}ifelse globaldict /OK@_CustTray 0 put
#elif :O4600
/PageSub Pagedv 1 sub def currentpagedevice /InputAttributes get PageSub known{ Pagedv statusdict /setpapertray 2 copy known{ get {exec}stopped {pop}{globaldict /OK@_CustTray PageSub put}ifelse (<<) cvx exec /Policies (<<) cvx exec /PageSize 7 (>>) cvx
exec (>>) cvx exec setpagedevice }{pop pop pop}ifelse }if
#elif :HPPRO
currentpagedevice /InputAttributes get Pagedv <</MediaPosition Pagedv >> setpagedevice
#else
<<currentpagedevice /InputAttributes get Pagedv get {}forall /InputAttributes << /Priority [Pagedv] >> >> setpagedevice
Xerox doesn't use a number according to the PPD it uses a string (ie Tray-1)
Pagedv is an integer so I need to append (concatenate) the literal "Tray-" onto it before we return it to the caller
> #elif :XRX
> currentpagedevice /InputAttributes get Pagedv << (Tray-Pagedv) xerox$MediaInputTray >> setpagedevice
I have a concatenate procedure I'm just not sure how to use it in this case.
/concatstrings % (a) (b) -> (ab)
{ exch dup length
2 index length add string
dup dup 4 2 roll copy length
4 -1 roll putinterval
} bind def