[cups-devel] IPP Everywhere tray detection and selection issues

Stephan stephanwib at googlemail.com
Fri Oct 7 05:48:12 PDT 2016


I now understand how it needs to be. The format of the input slots
needs to look like this in the PPD:

*InputSlot Tray2/Tray2: "<</MediaPosition 21>>setpagedevice"
*InputSlot Tray1/Tray1: "<</MediaPosition 20>>setpagedevice"

The string (e.g. Tray2) is automatically lowered and a dash is
inserted which leads to a "tray-2" for the media-source attribute. I
donĀ“t yet understand how these PPD to IPP conversion routines work in
detail.

I was able to get the tray discovery and selection working
out-of-the-box with the following hacks to ppd-cache.c


static const char * const sources[][2] =
...
      { "Tray-1", "Tray1" },
      { "Tray-2", "Tray2" },
      { "Tray-3", "Tray3" },

-         cupsFilePrintf(fp, "*InputSlot %s/%s: \"<</MediaPosition
%d>>setpagedevice\"\n", ppdname, sources[j][1], j);
+         cupsFilePrintf(fp, "*InputSlot %s/%s: \"<</MediaPosition
%d>>setpagedevice\"\n", sources[j][1], sources[j][1], j);

I have no idea how to fix this in the sense of the whole architecture
of the cups source.

Regards,

Stephan

2016-10-07 9:30 GMT+02:00 Stephan <stephanwib at googlemail.com>:
> Hi!
>
> I found another issue regarding IPP discovery and input trays. These
> are my printers:
>
> # ipptool ipp://10.70.235.31/ getattr.test
> ipp-versions-supported printer-name media-source-supported
> ---------------------- ------------ -------------------------------------
> 1.0,1.1,2.0            Lexmark C748 auto,tray-1,alternate,manual,envelope
>
> # ipptool ipp://10.70.235.32/ getattr.test
> ipp-versions-supported printer-name media-source-supported
> ---------------------- ------------ ----------------------
> 1.0,1.1,2.0            NPIB80216    auto,tray-2,tray-1
> (HP LaserJet 500 color m551)
>
>
> I found that trays named tray-* were not included in the resulting PPD
> and thus not selectable for the printer object. I suspect that is
> because the tray descriptions are wrong in ppd-cache.c.
>
>     static const char * const sources[][2] =
>     ...
>       { "Tray1", "Tray 1" },
>       { "Tray2", "Tray 2" },
>       { "Tray3", "Tray 3" },
>
> I changed these as below, according to
> https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext3v10-20120727-5100.13.pdf
> Table 14:
>
>       { "Tray-1", "Tray 1" },
>       { "Tray-2", "Tray 2" },
>       { "Tray-3", "Tray 3" },
>       ...
>
> The trays now appear in the PPD and are also selectable:
>
> *OrderDependency: 10 AnySetup *InputSlot
> *DefaultInputSlot: Auto
> *InputSlot Auto/Automatic: "<</MediaPosition 0>>setpagedevice"
> *InputSlot Tray-2/Tray 2: "<</MediaPosition 21>>setpagedevice"
> *InputSlot Tray-1/Tray 1: "<</MediaPosition 20>>setpagedevice"
> *CloseUI: *InputSlot
>
> However, when a print job is submitted to the printer, the
> media-source job attribute is never sent, leaving tray selection not
> working. The option is passed to the IPP backend, but is omitted by it
> for some reason.
>
> D [07/Oct/2016:07:01:42 +0000] [Job 297] argv[5]="colormodel=rgb
> Duplex=none finishings=3 inputslot=tray-1 number-up=1 PageSiz
> e=a4 job-uuid=urn:uuid:ecf5c718-230b-38ac-7e1e-119f1a5370f2
> job-originating-host-name=localhost date-time-at-creation= date-ti
> me-at-processing= time-at-creation=1475823702
> time-at-processing=1475823702 document-name-supplied=testfile.pdf"
>
> -Am I correct as for the tray descriptions in ppd-cache.c?
>
> -What is the reason for the IPP backend not sending the media-source
> job attribute?
>
>
> Regards,
>
> Stephan



More information about the cups mailing list