Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AirPrint support for iOS6 #4341

Closed
michaelrsweet opened this issue Jan 16, 2014 · 5 comments

Comments

Projects
None yet
1 participant
@michaelrsweet
Copy link
Collaborator

commented Jan 16, 2014

Version: 1.7-current
CUPS.org User: odyx

Hi Michael,

Till fixed CUPS's AirPrint support for iOS6 devices with the attached patch, and it hasn't been reported to you yet, as far as I could find.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 16, 2014

CUPS.org User: mike

Sorry, but we do not support AirPrint for shared printers served by CUPS.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 16, 2014

CUPS.org User: odyx

Ack, thanks.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 16, 2014

"airprint-support.patch":

Description: Patch to support Apple AirPrint (printing from iPhone, iPad, iPod Touch to a CUPS server)
Author: Till Kamppeter till.kamppeter@gmail.com
Bug: https://bugs.launchpad.net/bugs/711779
Bug: https://bugs.launchpad.net/bugs/1054495
Bug-Debian: http://bugs.debian.org/700961
Last-Update: 2013-02-20

--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -622,6 +622,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";
--- a/conf/mime.convs.in
+++ b/conf/mime.convs.in
@@ -48,6 +48,9 @@

PWG Raster filter for IPP Everywhere...

application/vnd.cups-raster image/pwg-raster 100 rastertopwg

+# Needed for printing from iOS (AirPrint) clients
+image/urf application/pdf 100 -
+
########################################################################

Raw filter...

--- a/conf/mime.types
+++ b/conf/mime.types
@@ -110,6 +110,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...

--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -3543,7 +3543,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));
    --- a/scheduler/conf.c
    +++ b/scheduler/conf.c
    @@ -722,7 +722,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);

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 16, 2016

CUPS.org User: lnussel

If adding support for Airprint really is as trivial as this patch what are the concerns with it?

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 16, 2016

CUPS.org User: mike

CUPS does not support everything that AirPrint needs, and many drivers do strange things (particularly on OS X) when you don't go through the local print dialog.

Generally speaking you can get away with it for common office printers using US Letter and A4 paper, but that's about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.