apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.9k stars 461 forks source link

IOS 7 clients fail to send IPP jobs in duplex #4357

Closed michaelrsweet closed 10 years ago

michaelrsweet commented 10 years ago

Version: 1.7.1 CUPS.org User: mbowie

We have been using IPP / AirPrint with IOS 6 clients for some time. With the adoption of IOS 7, we found that clients would see the printer and could print simplex, but if duplex was set on the client device, the job would not be sent to the CUPS spooler at all. (This was also reported on https://discussions.apple.com/message/23464216)

Testing with the IOS Simulator, the console logs ': [ipp-hostname]: Print-Job failed: Unsupported sides "two-sided-long-edge".' I compared PCAP's from this vs devices which were working, and bit for bit, the duplex IPP attributes matched, so I assumed the message is a bit of a misnomer or is generated in the context of a larger issue.

I setup an ipptool script to compare the values I was getting from a number of various hosts and after some tweaks to test/ippserver.c, ultimately came to the conclusion that having the urf-supported attribute returned by the spooler with "certain values" resulted in the job being submitted successfully. (I had hoped to include some form of logic around the URF values returned, but have not done terribly well at finding a reference which documents it.)

As a disclaimer, I've no familiarity with the CUPS source and I've done this with some degree of haste... but the attached patch (targeted for 1.7.1) is working for me here in testing.

Hope this is of some help to others. If anyone is interested in a similar hack for 1.5.x, I'll be putting that together for some of our systems also. If I manage to come across some reference for the URF values in question (or URF in general) I'll see about adding some selection logic to the patch.

Best,

Mike.

michaelrsweet commented 10 years ago

CUPS.org User: mike

CUPS does not support iOS. The two are not compatible,

michaelrsweet commented 10 years ago

"patch-scheduler_printers.c":

$NetBSD$ Enable the IPP urf-support attribute to keep IOS 7 duplexing possible

--- scheduler/printers.c.orig 2014-01-30 13:44:34.000000000 -0800 +++ scheduler/printers.c 2014-01-30 13:47:52.000000000 -0800 @@ -3464,6 +3464,29 @@ snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type);

 attr->values[i].string.text = _cupsStrAlloc(mimetype);

+