[SUGGESTION] switching trays in printjob

Kurt Pfeifle k1pfeifle at gmx.net
Fri Sep 7 08:41:25 PDT 2007


Philipp Morger wrote:

> created a document as outlined in a previous post by you, Page 1 on 
> Tray 3, Page 2 on Tray 4.... crossed fingers - didn't help.

You did use the very same PPD/printer in OOo as the one you would then
send the job to, yes?  (this is crucial, as the PostScript code inserted
by OOo for tray selection is model and vendor specific).

> So I stopped the printer in cups, to fetch the control and print file, 

The print file you get from /var/spool/cups/d00NNN-001 is *always*
the original file as received by CUPS.

> did a "strings" over it, here is the output:

"strings" is not the best method to get a complete picture about the
content of the CUPS control file (though in your case, it seemed "good
enough" to find the info you was looking for). Here are two better
methods:


 (a) Start "kjobviewer". Select the printer (or "all printers"). Click
     on the clock button to "Toggle view for completed jobs". Select the
     Job ID. Right-click and select "Job IPP Report" from the context
     menu. Voila!, you get the complete contents of the control file in
     a human readable form.

 (b) Use the "testipp" utility and run this command:

       testipp /var/spool/cups/c00NNN

     You'll see the same info as in kjobviewer, but formatted for termi-
     nal output. If testipp is not shipped by your Linux vendor inside
     the .rpm or .deb package, you'll have to build it yourself by com-
     piling CUPS from the official sources.

> %%BeginSetup
[....]
> %%IncludeFeature: *PageSize A4
> } stopped cleartomark
> %%IncludeFeature: *InputSlot Tray3
> } stopped cleartomark
> %%EndSetup

[....]

> %%Page: 2 2
> %%PageBoundingBox: 12 12 583 830
> %%BeginPageSetup
> %%IncludeFeature: *InputSlot Tray4
> } stopped cleartomark
> %%EndPageSetup

[....]

> As far as I'm able to read PS, I can see that the actual PS file 
> contains the tray switching instructions, 

Yes.

> the only thing that worries 
> me is the control file, which says something about Tray3 and nothing 
> about "Auto" or "and Tray4"

The control file will never know what specific options OOo inserted into
the PS. The control file will only ever know those job options that were
specified on the commandline (and all options which it read from such
files as $HOME/.cups/lpoptions or /etc/cups/lpoptions are equivalent to
commandline options).

-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list