tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: airprint patches for cups
I have a different patch (attached) in production for years.
It was some trouble to get the MDNS-SD part working (CUPS announcing a server name that wouldn't resolve, mdnsd announcing a link-local address cupsd was not listening on), but in the end, it worked.
--- scheduler/conf.c.orig 2017-06-30 17:44:38.000000000 +0200
+++ scheduler/conf.c 2017-10-09 18:25:08.000000000 +0200
@@ -745,7 +745,7 @@
DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED;
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
- cupsdSetString(&DNSSDSubTypes, "_cups,_print");
+ cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
#endif /* HAVE_DNSSD || HAVE_AVAHI */
cupsdSetString(&LPDConfigFile, CUPS_DEFAULT_LPD_CONFIG_FILE);
--- scheduler/dirsvc.c.orig 2017-06-30 17:44:38.000000000 +0200
+++ scheduler/dirsvc.c 2017-10-09 18:25:08.000000000 +0200
@@ -414,6 +414,12 @@
keyvalue[count ][0] = "pdl";
keyvalue[count++][1] = p->pdl ? p->pdl : "application/postscript";
+ /* iOS 6 does not accept this printer as AirPrint printer if there is
+ no URF txt record or "URF=none", "DM3" is the minimum needed found
+ by try and error */
+ keyvalue[count ][0] = "URF";
+ keyvalue[count++][1] = "DM3";
+
if (get_auth_info_required(p, air_str, sizeof(air_str)))
{
keyvalue[count ][0] = "air";
--- scheduler/printers.c.orig 2017-06-30 17:44:38.000000000 +0200
+++ scheduler/printers.c 2017-10-09 18:25:08.000000000 +0200
@@ -3689,7 +3689,9 @@
}
else if (!_cups_strcasecmp(type->super, "image"))
{
- if (!_cups_strcasecmp(type->type, "jpeg"))
+ if (!_cups_strcasecmp(type->type, "urf"))
+ strlcat(pdl, "image/urf,", sizeof(pdl));
+ else if (!_cups_strcasecmp(type->type, "jpeg"))
strlcat(pdl, "image/jpeg,", sizeof(pdl));
else if (!_cups_strcasecmp(type->type, "png"))
strlcat(pdl, "image/png,", sizeof(pdl));
--- conf/mime.types.orig 2017-06-30 17:44:38.000000000 +0200
+++ conf/mime.types 2017-10-09 18:25:08.000000000 +0200
@@ -111,6 +111,9 @@
image/x-bitmap bmp string(0,BM) + !printable(2,14)
image/x-icon ico
+# Needed for printing from iOS (AirPrint) clients
+image/urf urf string(0,UNIRAST<00>)
+
########################################################################
#
# Text files...
--- conf/mime.convs.in.orig 2017-06-30 17:44:38.000000000 +0200
+++ conf/mime.convs.in 2017-10-09 18:25:08.000000000 +0200
@@ -47,6 +47,9 @@
application/vnd.cups-raster image/pwg-raster 100 rastertopwg
application/vnd.cups-raster image/urf 100 rastertopwg
+# Needed for printing from iOS (AirPrint) clients
+image/urf application/pdf 100 -
+
########################################################################
#
# Raw filter...
Home |
Main Index |
Thread Index |
Old Index