[SUGGESTION] switching trays in printjob

Kurt Pfeifle k1pfeifle at gmx.net
Fri Sep 7 09:42:00 PDT 2007


Kurt Pfeifle wrote:
> Kurt Pfeifle wrote:
> 
>>> %%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.
> 
> Uhmmm.... actually, no. It does *not* contain valid code to switch
> the trays, AFAICS. It pretends to, but it doesn't work like that.
> 
> It contains "empty" code only. It should look similar to this:
> 
>   %%BeginSetup
>   [....]
>   %%IncludeFeature: *PageRegion A4
>   << /PageSize A4 [595 842] /ImageBBox null >> setpagedevice
>   } stopped cleartomark
>   %%IncludeFeature: *InputSlot Tray3
>   << /MediaPosition 3 >> setpagedevice
>   } stopped cleartomark
>   %%EndSetup
> 
>   [....]
> 
>   %%Page: 2 2
>   %%PageBoundingBox: 12 12 583 830
>   %%BeginPageSetup
>   %%IncludeFeature: *InputSlot Tray4
>   << /MediaPosition 4 >> setpagedevice
>   } stopped cleartomark
>   %%EndPageSetup
> 
> 
> But before you go and submit a bug report, wait if Mike and/or Helge
> chime in to comment (they are the resident PostScript gurus here :-)

Here is another tip that may help you debug your case (and some other
ones you may encounter in your future admin career :-)  ):

 (1) go visit http://techbase.kde.org/Projects/KDEPrint/Tools%2BUtilities
     and fetch one or both of the CUPS backend scripts "2file" and "2dir".

 (2) install a virtual printer using your PPD and one of the backend
     scripts so you can "print to file" with them.

 (3) in cupsd.conf, insert "PreserveJobFiles" and restart cupsd.

 (3) print to the new printer.

Now you'll have 2 files on disk:

 (a) the file as was handed to CUPS by OOo in /var/spool/cups/d000NN

 (b) the file as it was changed by the CUPS filtering chain, according
     to your overall print settings.

Now you can look at the differences of the two files, using

  sdiff -sbB file1 file2

You'll probably notice that CUPS does insert non-empty PostScript code
to address the tray selection, while OOo does a fake job on it.

If that is confirmed, submit a bug report with the OOo folks.


-- 
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