input tray selection - pdftops vs. ghostscript

Michael Sweet mike at
Wed Jul 28 06:50:22 PDT 2004

Björn Pusch wrote:
> Michael Sweet wrote:
>>How are you merging the resulting PS files?
> We just cut off the %EOF and concatenate them.

Hmm, not the best way to handle it, as the %%Page: comments
will be out-of-whack and you'll have multiple prolog and
setup sections, which can confuse high-end printers.

>>Since pdftops (as shipped in CUPS) does not send printer-specific
>>commands, how are you adding the printer-specific commands to the
>>final PS file?
> Which printer-specific commands do you mean?

Anything that uses setpagedevice, basically.  Normally the output
from the CUPS version of pdftops does not contain printer commands;
those are added by pstops prior to the file going to the backend.

> Input tray selection in the ps file occurs as follows (for each
 > document):
> %%BeginFeature: *InputSlot Optional
>   currentpagedevice /InputAttributes get 5 get
>   dup null eq
>   { pop }
>   { dup length 1 add dict copy
>     dup /InputAttributes
>     1 dict dup /Priority [5] put
>     put setpagedevice
>   } ifelse
> %%EndFeature
> We tried this with the 3.0 version of xpdf as well as the built-in
 > pdftops of cups 1.1.19.

Are you working with the output of pdftops directly, or the output
from pstops in the filter chain?

Michael Sweet, Easy Software Products           mike at easysw dot com
Printing Software for UNIX             

More information about the cups mailing list