mirror of https://gitee.com/openkylin/cups.git
Patch to support Apple AirPrint (printing from iPhone, iPad, iPod Touch to a CUPS server)
Bug-Ubuntu: https://bugs.launchpad.net/bugs/711779 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054495 Bug-Debian: https://bugs.debian.org/700961 Bug: https://github.com/apple/cups/issues/4341 Patch-Name: airprint-support.patch Gbp-Pq: Name 0018-Patch-to-support-Apple-AirPrint-printing-from-iPhone.patch
This commit is contained in:
parent
843db89d68
commit
b697d4aac6
|
@ -44,6 +44,9 @@ application/postscript application/vnd.cups-postscript 66 pstops
|
|||
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...
|
||||
|
|
|
@ -108,6 +108,9 @@ image/x-alias pix short(8,8) short(8,24)
|
|||
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...
|
||||
|
|
|
@ -745,7 +745,7 @@ cupsdReadConfiguration(void)
|
|||
DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED;
|
||||
|
||||
#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
|
||||
cupsdSetString(&DNSSDSubTypes, "_cups,_print");
|
||||
cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
|
||||
cupsdClearString(&DNSSDHostName);
|
||||
#endif /* HAVE_DNSSD || HAVE_AVAHI */
|
||||
|
||||
|
|
|
@ -440,6 +440,12 @@ dnssdBuildTxtRecord(
|
|||
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";
|
||||
|
|
|
@ -3731,7 +3731,9 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
|
|||
}
|
||||
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));
|
||||
|
|
Loading…
Reference in New Issue