Dynamically assign print tray

Andrew kc2lto at gmail.com
Wed Jan 25 07:55:29 PST 2006


Helge Blischke <h.blischke at srz.de> wrote in
news:23742-cups.general at news.easysw.com: 

> Andrew wrote:
>> 
>> I am going to be writing a small program to print a batch of files
>> automatically. However, I need to select different trays on the fly
>> because of different paper formats. I have looked but have not found
>> command line arguements or APIs that allow me to pass a tray option
>> without manually reconfiguring the printer settings in CUPS
>> everytime. How can this be done? 
> 
> Usually the printer's PPD offers keywords for both tray selection
> and/or media type selection. You may easily use these keywords with
> the approrioate values as command line options (or access them via API
> functions). 
> 
> But, if you need to use different trays within a single job, you'd
> have to insert the appropriate PS snippets into the PS job.
> 
> Helge
> 

Ok I looked through the PPD file and InputSlot is the configurable option. 
However, I am not sure how to pass the argument through the command line to 
the printing function (im currently using lp or lpr). If there another 
command I should be using? 

-Andrew




More information about the cups mailing list