<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
On 10/08/2010 11:38 AM, Michael Sweet wrote:
<blockquote cite="mid:853361B6-6A4F-4127-87AC-6E727856E71B@apple.com"
 type="cite">
  <div>
  <div>On Sep 24, 2010, at 10:52 AM, Steve Wilson wrote:</div>
  <blockquote type="cite">
    <div text="#000000" bgcolor="#ffffff"><font class="Apple-style-span"
 color="#000000">...<br>
    </font>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.<br>
    <br>
<snip><br>
%%EndResource<br>
%%EndProlog<br>
%%BeginSetup<br>
%%BeginFeature: *InputSlot Upper<br>
<</ManualFeed false /MediaPosition 3>> setpagedevice<br>
%%EndFeature<br>
%%EndSetup<br>
%%Page: 1 1<br>
<snip><br>
    </div>
  </blockquote>
  </div>
  <div><br>
  </div>
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?
  <div><br>
  </div>
</blockquote>
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:<br>
    HP LaserJet 8150 Series Postscript (recommended) (en, ...., zh_TW)<br>
<br>
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.<br>
<br>
Here's the relevant portion of the wrapper script written in Perl:<br>
<blockquote># Is this a banner page?<br>
if ($ENV{CUPS_FILETYPE} eq "job-sheet") {<br>
    # Modify the print options arguement.<br>
    $ARGV[4] =~ s/MediaType=[^ ]+//;<br>
    $ARGV[4] =~ s/InputSlot=[^ ]+//;<br>
    $ARGV[4] =~ s/Duplex=[^ ]+//;<br>
    $ARGV[4] =~ s/sides=[^ ]+//;<br>
    $ARGV[4] =~ s/media=[^ ]+//;<br>
    $ARGV[4] .= " Duplex=None MediaType=Color media=Upper
sides=one-sided";<br>
}<br>
  <br>
# Execute the "real" filter.<br>
exec "$progpath/$progname\.real", @ARGV;<br>
</blockquote>
<br>
Regards,<br>
<br>
Steve<br>
<br>
<pre class="moz-signature" cols="72">-- 
Steven M. Wilson, Systems and Network Manager
Markey Center for Structural Biology
Purdue University
(765) 496-1946
</pre>
</body>
</html>