[cups.general] JobSheets printed from a different input tray

Steve Wilson stevew at purdue.edu
Fri Oct 8 09:44:45 PDT 2010


On 10/08/2010 11:38 AM, Michael Sweet wrote:
> On Sep 24, 2010, at 10:52 AM, Steve Wilson wrote:
>> ...
>> Thanks for the help but I must still be doing something wrong.  Below 
>> is a snippet from my PostScript file.  I tried various PPD features 
>> in this manner but I was unable to get the banner page to print from 
>> a different input tray.  Do you see anything obviously wrong with 
>> this?  Thanks.
>>
>> <snip>
>> %%EndResource
>> %%EndProlog
>> %%BeginSetup
>> %%BeginFeature: *InputSlot Upper
>> <</ManualFeed false /MediaPosition 3>> setpagedevice
>> %%EndFeature
>> %%EndSetup
>> %%Page: 1 1
>> <snip>
>
> Nothing obviously wrong - can you post a link to the PPD file (or send 
> me the file directly) for a queue that isn't working?
>
Thanks for your response.  The PPDs I was using were the stock ones 
supplied with our CUPS installation.  As a specific example, we used one 
labelled:
     HP LaserJet 8150 Series Postscript (recommended) (en, ...., zh_TW)

I ended up writing a wrapper script that would modify the print options 
being passed to each filter in the chain for printing our Postscript 
separator page.  It's quite inelegant but it does get the job done.  
Perhaps a desirable CUPS feature would be to have separate print options 
for banner sheets distinct from the print options for the print job itself.

Here's the relevant portion of the wrapper script written in Perl:

    # Is this a banner page?
    if ($ENV{CUPS_FILETYPE} eq "job-sheet") {
         # Modify the print options arguement.
         $ARGV[4] =~ s/MediaType=[^ ]+//;
         $ARGV[4] =~ s/InputSlot=[^ ]+//;
         $ARGV[4] =~ s/Duplex=[^ ]+//;
         $ARGV[4] =~ s/sides=[^ ]+//;
         $ARGV[4] =~ s/media=[^ ]+//;
         $ARGV[4] .= " Duplex=None MediaType=Color media=Upper
    sides=one-sided";
    }

    # Execute the "real" filter.
    exec "$progpath/$progname\.real", @ARGV;


Regards,

Steve

-- 
Steven M. Wilson, Systems and Network Manager
Markey Center for Structural Biology
Purdue University
(765) 496-1946

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cups.org/pipermail/cups/attachments/20101008/ed2f6eaa/attachment-0001.html>


More information about the cups mailing list