or Connect
AppleInsider › Forums › Mobile › iPad › Inside AirPrint: How to add iOS printer sharing back to Mac OS X
New Posts  All Forums:Forum Nav:

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

post #1 of 30
Thread Starter 
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.

post #2 of 30
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.
post #3 of 30
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.
post #4 of 30
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
post #5 of 30
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.)
post #6 of 30
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.
post #7 of 30
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.
post #8 of 30
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.
post #9 of 30
Ok, so anyone got AirPrint working on 10.5 PowerPC systems yet?
post #10 of 30
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.
post #11 of 30
This doesn't seem to break anything. This isn't like jailbreaking or unlocking a device.
post #12 of 30
Quote:
Originally Posted by macinthe408 View Post

My hack involves waiting for the official release.

Haha.
Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
Citing unnamed sources with limited but direct knowledge of the rumoured device - Comedy Insider (Feb 2014)
Reply
post #13 of 30
I will report back with my Airport Extreme Base Station tests when I get home tonight and "hack" my Mac.
post #14 of 30
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.
post #15 of 30
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.
post #16 of 30
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
post #17 of 30
Any idea if AirPrint will work for printers connected to a print server, in a non-OSX environment?
post #18 of 30
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

Life is too short to drink bad coffee.

Reply

Life is too short to drink bad coffee.

Reply
post #19 of 30
Quote:
Originally Posted by mstone View Post

iTunes is beta 2 not GM

My apologies and oversight.
post #20 of 30
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.
post #21 of 30
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!
post #22 of 30
Quote:
Originally Posted by PersonMan View Post

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.

The readership of this publication includes people in addition to full-on geeks. I'm surprised that AI prints hacking instructions without the usual warnings, and without instructions on the method to preserve the files you overwrite. They also tell you that "The files [are] widely spread around the web" with no advice as to where one might find an uncorrupted and safe source.


I consider this sort of article to be irresponsible in a publication like this.
post #23 of 30
Quote:
Originally Posted by Steve-J View Post

The readership of this publication includes people in addition to full-on geeks. I'm surprised that AI prints hacking instructions without the usual warnings, and without instructions on the method to preserve the files you overwrite. They also tell you that "The files [are] widely spread around the web" with no advice as to where one might find an uncorrupted and safe source.


I consider this sort of article to be irresponsible in a publication like this.

This is hardly hacking OS X at all.

This is all standard filter/mimetype cups stuff any printer manufacturer could and does add to OS X.
You could add corrupt files and this WILL NOT screw up OS X.

I'm curious if its only people that didn't have a previous 10.6.5 beta installed that needed these steps. The correct files should still exist if you had the beta installed and no extra steps should be needed.
post #24 of 30
Ok. It works fine with my 10 year old inkjet attached to the most recent airport base station. Awesome. I wish it worked via the airport base station without the laptop being on however.
post #25 of 30
Just curious and for clarification purposes. If I have a new HP ePrinter, and am running the 4.2 GM on my iPad, I should be able to print without having to use my MBP or do I need to enable sharing of the printer for this to work? My understanding is that with the new ePrinters from HP, you only have to put it on the network, have the 4.2 GM installed on the iPad, and they will see each other. However, prior to installing the three files, my iPad was not able to see the new HP ePrinter to print to. Am I mistaken in assuming that the iPad should be able to print directly?

TIA
post #26 of 30
Hmm. We're two weeks away from submitting a (fairly substantial) app to the Store. We HAD Airprint enabled - but now wondering whether to remove it. Should we include a button in our App's UI that might not work?
post #27 of 30
Since iTunes 10.1 is needed to update to 4.2, I wonder if they decided to include the print files in the iTunes update. That would enable users that don't have the most current release of Snow Leopard to print out documents.
post #28 of 30
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 just updated our IPad last night. I have AirPrint working. I have an Epson R340 connected to my TimeCapsule. The printer is shared via my MAC. I had to install the files to my MAC and then remove my printer from the MAC and reinstall.

Printing emails and web pages seem to work fine. Printing photos does not work properly. The photo gets cropped oddly. I'm guessing this is why printer sharing is not officially supported yet. I can live w/out photo printing for now.
post #29 of 30
Okay, so I don't have one of those new ePrint printer from HP, but I have one of those WiFi enabled HP Printer and I have been using it without any sharing issue from various laptops in my household (Mac and PC). Now, why can't I use them through my iPad and iPhone using AirPrint - Why is it that hard? Why does the printer have to be shared from machine, which might be even turned on - Isn't that the whole idea of buying network enabled printers? And when this AirPrint thing came up - I said great! Now I can print it from my mobile devices too.
post #30 of 30
I'm an experienced Mac user but I struggled to understand and gather these tips together to make this fix work. Perhaps I've failed to make 'geek' status, but I feel many like me would benefit from a simple step-by-step procedure to achieve this fix. It worked for me for a HP Deskjet F300 series all-in-one connected by USB to my iMac.

1. Download to your Mac AirPrintFix-ChuckG.zip from http://cl.ly/3BmD (or other sites)

Note: The relevant system files are hidden so use the Go menu from Finder to find the locations. (no need to use Terminal or root user mode, I found, but you do need to have your administrator password to authenticate changes to these system files as you go along).

2. Choose 'Go to folder' from the Go menu. Type in /usr

3. Navigate through folders: libexec/cups/filter

4. Copy the urftopdf file from the download to the filter folder
(I've kept copies of these downloaded files in case they are overwritten/deleted in future MacOSX updates. So I option-dragged them into place)

Note: the next two files, apple.convs and apple.types REPLACE existing files, so I copied the existing files to another location in case things went wrong with this fix and I wanted to restore things to how they were.

5. Navigate through folders: share/cups/mime

6. Copy apple.convs and apple.types from the download into the mime folder, instructing to replace the existing files.

7. Open System Preferences and open Fax and Print preferences.
Note the name of your default printer if you think you might forget it.

8. Delete your existing printer (select the printer from the list and click the minus button).

9. Restart your Mac

10. Go back to Fax and Print preferences, click the + button and enter your printer's name to add your printer back to the list. Make sure printer sharing is on.

11. Test printing from your iPhone or iPad by opening an email and clicking the curved arrow icon. Obviously your Mac needs to be switched on.

Very satisfying when it works!
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: iPad
  • Inside AirPrint: How to add iOS printer sharing back to Mac OS X
AppleInsider › Forums › Mobile › iPad › Inside AirPrint: How to add iOS printer sharing back to Mac OS X