Return AirPrint sharing to Mac OS X v10.6.5

Today, Apple released Mac OS X v10.6.5 which was supposed to bring AirPrint to any printer connected to your Mac. Only problem is, a last minute issue (due to patent trolling?) has caused them to pull support for AirPrint in OS X.

Don't panic! You can return it, but you're going to have to pull some files from a prerelease version of 10.6.5.

The files you need are:

/usr/libexec/cups/filter/urftopdf
/usr/share/cups/mime/apple.convs
/usr/share/cups/mime/apple.types

If you migrate those from a 10.6.5 prerelease build (there seem to be many floating around torrent sites and file sharing sites - build 10H542 works; naturally I can't link you to the files themselves, sorry!) to your machine you're just one step away from having AirPrint working.

The final key thing is you have to remove and re-add your printer in the Print & Fax preferences pane. Once you do that (and share your printer in the Sharing preferences pane) it should show up on any iOS devices that support AirPrint.

Nerdy extra info: Basically, doing this should add the image/urf mimetype to your shared printer, and a new Bonjour field 'URF'. Once you have those, it should work. Theoretically, there's no reason someone can't write a server application that broadcasts said Bonjour info and prints for you, so you don't have to use files from a prerelease build. I would expect something like that to appear over the next few weeks.

Thanks to Patrick McCarron for helping me debug this method

Good luck!

27 comments:

  1. can you explain how to do this? i have the dmg for an old build

    ReplyDelete
  2. @jajajja use the exceptional app Pacifist to extract them from the .pkg file if you find the build ; www.charlessoft.com

    ReplyDelete
  3. URF=W8,SRGB24,CP1,RS600 :

    hmm, does this mean URF is an sRGB 24bit, 600dpi raster format? I'd need to see some of these URF files to actually find out...

    ReplyDelete
  4. (in case anyone is interested, that's from http://www.rho.cc/index.php/linux2/48-misc/104-printing-from-ipad-airprint-via-cups )

    ReplyDelete
  5. Hmm, I presume if you replaced the urftopdf binary with one of your own and had it save the file it was passed out somewhere you would get an URF file.

    Altho, haven't investigated how the binary works

    ReplyDelete
  6. Thanks! Worked for me. I could not print before and now I can.

    ReplyDelete
  7. Wow! It works, it works! Thank you! Now if only there was a fix for the 4.2 iPad wifi issues! Grrrr!

    ReplyDelete
  8. I had no problems installing 10H574 over the 10H542 beta - and AirPrint was not affected, it still works without having to use the 10H542 files you listed.

    ReplyDelete
  9. So after a little prodding I've determined that the URF field in the mDNS record isn't needed. My printer doesn't export one at all, and everything on the iPad prints to it.

    The annoying part (having written a urftopdf script which dumps the input to a file for me to debug) is that so far everything is opting to send data as application/pdf. Given that my shared printer reports these formats:

    application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf

    …I'm guessing that the earlier appearance of application/pdf means that the iPad is just going to use CoreGraphics to produce PDF data to send.

    Hell, if it works, it works (I'll publish a script shortly which will 'enable' AirPrint again) but I'd be much happier if I could get hold of an actual blob of URF data somewhere to play with.

    ReplyDelete
  10. Any idea on how to get this to work on Leopard (10.5). /usr/libexec/cups/filter/urftopdf can be invoked from the command line on PPC, but complains that I am not giving it data (duh!). I would love to enable AirPrint on my wife's PowerBook G4 with 10.5, if anyone has any suggestions. The mime files for cups live in a different directory, but placing the ones from SL there does not allow be to see the printer from my iPhone though I have done all of the required steps.

    ReplyDelete
  11. Hey Steven. Thats a great solution. I've put together a package that installs the files you mentioned. Its here.

    http://www.megaupload.com/?d=ETMYXIHG

    Thanks, George

    ReplyDelete
  12. @George: the package didn't work for me I'm afraid... going to try to hunt down the files now...

    ReplyDelete
  13. These steps don't appear to work for Mac OS X Server. Anyone gotten this to work?

    ReplyDelete
  14. Figured it out...

    /etc/cups/cupsd.conf was a little different on Mac OS X Server by default.

    Adding these lines worked:


    Browsing On
    BrowseOrder allow,deny
    BrowseAllow all
    BrowseRemoteProtocols
    BrowseAddress @LOCAL
    BrowseLocalProtocols CUPS dnssd

    ReplyDelete
  15. @ vanetten

    I've added these lineson my server but it still doesn't work...

    ReplyDelete
  16. Ok rebooted, deleted and re added the printer several times now it works...

    ReplyDelete
  17. A n00b tutorial anywhere? Thanks!

    ReplyDelete
  18. I placed all three files as directed, rebooted, removed and re-added my printer. iPad still gives "No printers found" message. Could someone include the missing link that was perhaps assumed I would just know?

    ReplyDelete
  19. Does the printer have to be connected to the computer directly via USB, or does a wireless network connection work? Thanks!

    ReplyDelete
  20. @revision29!
    I have an old G4 running Leopard 10.5.8 and this is what i did. 1. Locate /usr/libexec/cups/filter/ and add the unix-file. 2. Locate /usr/share/cups/ and add the mime folder with apple.convs, apple.types. 3. Delete your printer from Print and Fax settings from System Preferences. 4. Reboot. 5. Add printer. Done. Worked fine :)

    ReplyDelete
  21. @Dennis, thanks. I tried to put those files in /etc/cups/, but obviously that was the wrong move. Now I won't have to pony up $8 for this functionality.

    ReplyDelete
  22. If you are having trouble it might be because the new files are quarantined.

    Run the following command on each file to determine if it is: "ls -l@ filename". If they are the attributes will mention com.apple.quarantine.

    To remove the quarantine run the command: "xattr -d com.apple.quarantine filename" on each of the files that has the problem.

    Then remove your printer from preferences, reboot, re-add the printer and enable sharing. At this point it should be working.

    ReplyDelete
  23. All seems to work accept prints do not come out of the printer. My iPhone discovers the printer and even says printing. Must the printer be connected directly to the Mac or Airport versus a network? Thank you.

    ReplyDelete
  24. I have the same problem as Z; phone discovers printers and says it is printing but never does print anything. On my phone, the discovered printers show a lock next to them, could this be why they are not printing? On my Mac, I login as a network user and not root. I don't see a way to authenticate on the phone in the print section. Something maybe you have to do on the Mac?

    ReplyDelete