Inside AirPrint: How to add iOS printer sharing back to Mac OS X

Posted:
in iPad edited January 2014
Experimenters have discovered the configuration files Apple removed from the public release of Mac OS X 10.6.5; adding them back restores the ability to print from iOS devices to shared printers on the Mac.



AirPrint for shared printers on Mac OS X works using a CUPS filter. CUPS (Common Unix Printing System) is an open source package that serves as the printing architecture for Mac OS X, Linux, and other Unix-like operating systems. Apple adopted CUPS in 2002, and since 2007 has owned the code and maintained the CUPS open source project.



CUPS uses filters to process incoming print jobs and convert them into a format suitable for a given printer. AirPrint on iOS creates a print job in a format called URF, which needs to be converted to PDF to enable printing on any printer.



The CUPS is half full



Step one in activating AirPrint under CUPS is to install the "URFtoPDF" CUPS filter Apple wrote and included in developer builds of the Mac OS X 10.6.5 update, but removed from the public version for unknown reasons (believed to be related to patent issues).



Additionally, two other CUPS MIME files must be overwritten: one "apple.types," simply includes a definition of the image/urf MIME type for CUPS, which is used when advertising a shared printer's features over Bonjour. The second, "apple.convs," simply specifies that print jobs of the image/urf MIME type should use the urftopdf filter.



Once these files are installed on Mac OS X 10.6.5, the system must be rebooted and existing printers should be deleted and recreated. The moment Printer Sharing is turned on for a fresh printer queue, its name appears instantly on searching iPads or other iOS devices running iOS 4.2, thanks to Bonjour network advertising, which is turned on when a printer is shared.



The files and instructions for copying them have been posted in the comments of the previous article on AirPrint, and are also widely spread around the web.



Interestingly, one reader points out that Apple compiled the urftopdf filter in PowerPC code as well as for Intel, suggesting that the company may release a standalone update that brings the feature to Leopard users in addition to Intel-only Snow Leopard users. Additionally, a developer has outlined how to add AirPrint features to other operating systems that use CUPS (such as Linux) using the open source Avahi code, which works like Bonjour.



All Automatic AirPrint



AirPrint appears to automatically select most options for the user. In AppleInsider testing, printing an email or similar document resulted in a standard printed page, while printing a photo selected the photo-sized paper tray and photo-quality printing settings on the (non-ePrint) HP 'all in one' model we tested against.



This highly automatic printing system makes it easy to create printed documents from content on mobile devices, at the expense of not allowing users (so far) to create customized print jobs. However, users on a mobile device are likely to prefer a simple, easy to use system that generally selects the most sensible settings for them, rather than forcing the user to wade through complex print configuration pages just to generate a printed photo or a hard copy of a document.



«1

Comments

  • Reply 1 of 29
    Has anyone done this with the public release and tested it? If so, I am going to do this. However I have an old ass inkjet hooked up to my Airport Base Station.
  • Reply 2 of 29
    Quote:
    Originally Posted by ghostface147 View Post


    Has anyone done this with the public release and tested it? If so, I am going to do this. However I have an old ass inkjet hooked up to my Airport Base Station.



    This method did work for me. One thing that I would add, that I had to do, is after adding my printer back, the iPad still could not find the printer. After adding and deleting, rebooting again, it still did not work. I then printed a test page and then after the first print, I was able to print on my iPad.
  • Reply 3 of 29
    Quote:
    Originally Posted by ghostface147 View Post


    Has anyone done this with the public release and tested it? If so, I am going to do this. However I have an old ass inkjet hooked up to my Airport Base Station.



    YES!, it works with the released 10.6.5 OS. Of course, iOS 4.2GM is not officially released, but the patch is to OS-X itself.



    It really does NOT matter how you have your printer attached to your mac, or how old it is, as long as it works with OS-X and you turn on sharing for the printer after applying the patch, CUPS handles all the details.



    david
  • Reply 4 of 29
    My hack involves waiting for the official release.



    (Now I know where all those people whining on Apple forums about their broken computer come from.)
  • Reply 5 of 29
    Quote:
    Originally Posted by macinthe408 View Post


    My hack involves waiting for the official release.



    (Now I know where all those people whining on Apple forums about their broken computer come from.)



    That will probably be next April.
  • Reply 6 of 29
    Quote:
    Originally Posted by macinthe408 View Post


    My hack involves waiting for the official release.



    (Now I know where all those people whining on Apple forums about their broken computer come from.)



    Provided you have not been messing around with your computer, like all the people who could not wait to Jailbreak their phone and stick the IOS 4.2 GM on it and complain when all does not go smoothly.



    I thought all that tweaking was a thing of the past but I guess all these geeks know best.
  • Reply 7 of 29
    Quote:
    Originally Posted by Steve Taylor View Post


    Provided you have not been messing around with your computer, like all the people who could not wait to Jailbreak their phone and stick the IOS 4.2 GM on it and complain when all does not go smoothly.



    I thought all that tweaking was a thing of the past but I guess all these geeks know best.



    A full-on hardcore computer geek knows better than to gripe and complain if a hack breaks his computer or iPhone.



    The problem is all the non-geeks using hacks they don't have enough computer experience to apply properly. Especially if they ignore the warnings from the geeks.
  • Reply 8 of 29
    Ok, so anyone got AirPrint working on 10.5 PowerPC systems yet?
  • Reply 9 of 29
    I just tried the fix and i am able to print from my iPad and iPhone 4 now. I am running 10.6.5 with the printer directly hooked to my mac mini by USB. The rest of the house is still able to print as well (2 PCs). And the printer model i am using is a Lexmark 2550 series.
  • Reply 10 of 29
    netdognetdog Posts: 244member
    This doesn't seem to break anything. This isn't like jailbreaking or unlocking a device.
  • Reply 11 of 29
    irelandireland Posts: 17,571member
    Quote:
    Originally Posted by macinthe408 View Post


    My hack involves waiting for the official release.



    Haha.
  • Reply 12 of 29
    I will report back with my Airport Extreme Base Station tests when I get home tonight and "hack" my Mac.
  • Reply 13 of 29
    Quote:
    Originally Posted by ghostface147 View Post


    Has anyone done this with the public release and tested it? If so, I am going to do this. However I have an old ass inkjet hooked up to my Airport Base Station.



    I did it this morning. Worked fine. Just make backups of the files you overwrite (just in case).



    Printed an excel document in an email from my ipad. This was most excellent.
  • Reply 14 of 29
    Quote:
    Originally Posted by macinthe408 View Post


    My hack involves waiting for the official release.



    (Now I know where all those people whining on Apple forums about their broken computer come from.)



    my hack comes from no longer supporting the product....

    and laughing at all these suckers trying to get something that should have been in place from day one working.
  • Reply 15 of 29
    For the record, this patch does NOT involve jailbreaking or hacking the iPhone...PERIOD. Installing iOS4.2GM is a legit install (assuming you have access to the iphone developers site or a copy of the GM .ipsw file for your particular iDevice ).



    While the OS-X CUPS patch might work with 10.6.4, but it does not seem to have been tested. Given that OS-X 10.6.5 IS released software, it is available for all to legally install. This patch does NOTHING to the iOS device. Also, installing the patch does NOTHING harmful to OS-X or the CUPS printer environment in OS-X.



    For IOS printing to function, iOS4.2 IS MANDATORY and to install iOS4.2 you MUST FIRST install iTunes 10.1. Neither of these have been publicly released, but both are in GM status to the developer community (rumored to be publicly released tomorrow Nov 12).



    Even if you wait until AFTER ITunes 10.1 and iOS4.2 are publicly released, assuming that Apple does not roll the updated CUPS print system files as either a separate update or as part of iTunes 10.1 (unlikely as they are NOT currently in the iTunes 10.1GM), shared printer access to iOS devices will NOT work without the installation of these 3 files into the appropriate CUPS directories. iOS printing to the limited e-print capable HP printers WILL work without this patch, but unless you are in the market for a new printer, this is a pretty high price just to gain printing from your iOS device. Installing this patch will NOT hinder printing directly to e-print capable printers.



    You MUST 1st install iTunes 10.1GM BEFORE you attempt to install iOS4.2GM (it will NOT work if you attempt it with iTunes 10.0). Again, you have to have legit access to this upgrade, but it is a typical iTunes upgrade.



    The patch is a simple overlay in OS-X of two config files in the CUPS system and the addition of a new CUPS filter to convert from the iOS print format to pdf. ALL 3 of these files were created by Apple and part of previous beta releases of OS-X10.6.5, but removed just before 10.6.5 was released. Restoring these files simply allows the CUPS print system to expose OS-X attached and shared printers to the iOS environment and to handle print requests from iOS platforms.



    If you are not comfortable with manual installs, use of "terminal" and generally lack the knowledge of how to roll things back, don't attempt the patch.



    Lastly, once everything is installed and patched, there is NOTHING immediately detectably different on the iOS or OS-X platforms relating to printing. From within iOS apps, when you press the action button that normally allows you to sms, mms, forward, reply, etc for the specific app, you will find that a new action is available, "print". Once you have a print job submitted, you can double click on the iOS home button and you will find a new app icon "Print Center" where you can see the status of all print jobs as well as the ability to cancel a print job" FYI, there is nothing in "Settings" related to printing.



    david
  • Reply 16 of 29
    Any idea if AirPrint will work for printers connected to a print server, in a non-OSX environment?
  • Reply 17 of 29
    mstonemstone Posts: 11,510member
    Quote:
    Originally Posted by dtidmore View Post


    For IOS printing to function, iOS4.2 IS MANDATORY and to install iOS4.2 you MUST FIRST install iTunes 10.1. Neither of these have been publicly released, but both are in GM status to the developer community (rumored to be publicly released tomorrow Nov 12).



    iTunes is beta 2 not GM
  • Reply 18 of 29
    Quote:
    Originally Posted by mstone View Post


    iTunes is beta 2 not GM



    My apologies and oversight.
  • Reply 19 of 29
    Quote:
    Originally Posted by chemeddy View Post


    Any idea if AirPrint will work for printers connected to a print server, in a non-OSX environment?



    Doubtful. It works on Windows through iTunes and on Mac's (yes, even those that are on a Time Capsule) through printer sharing off a mac.



    Stand-alone will probably only work with printers that support a direct connection.



    It seems to work by creating a special file type (urf) and converting that to a pdf. The pdf is then printed. I guess the fancy HP printers can print the urf files directly.
  • Reply 20 of 29
    Quote:
    Originally Posted by macinthe408 View Post


    My hack involves waiting for the official release.



    (Now I know where all those people whining on Apple forums about their broken computer come from.)





    Seriously. If I've learned anything about Apple products, you gotta do it their way. If you do, it just works. If you deviate even a little, it never works again.



    Try accidently unplugging your iPhone in the middle of a sync for a stark example. Hello Restore!
Sign In or Register to comment.