Jump to content

Print from your ipad to any printer!


1 post in this topic

Recommended Posts

Ever since iOS 4.2 came out you can now print from your ipad or iphone. I always wondered how that works as I can't tell you how many times I've needed to quickly print a coupon up and didn't have time to start up my main computer just to print something from my ipad. Turns out its not so easy as it seems but not impossible to do so. Once upon a time if you owned a Mac or other types of home made ones you could hook up your printer to your computer and share it with the rest of your network including your ipad or iphone. However since 10.6.5 I think apple got rid of that feature in favor of forcing you to buy an 'Airprint' compatible enabled printer from HP. This is why we hack!


So last night I took on this project and it was easier than I thought. I read a few guides of which I provided links to their content. Anyhow there are a few prerequisites. Works best if you have your own Linux/Debian/Ubuntu print server already running as mine is setup in a D525 Foxconn Atom 1.8ghz dualcore Netbox running Debian. Your going to need Cups print server running along with Avahi zeropoint multicast service installed. When I installed Debian I checked off print server environment so Cups was already installed. I also went into the package manager and installed Cups-pdf package so I can also print to a pdf file. First you configure the cups.conf file to allow the network to see your printers. Follow the wordpress article word for word. Your going to also have to turn on print sharing in Debian for each printer. The trickiest part of the guide was creating the right Avahi service files for each printer. I just copy-n-pasted the xml data directly into avahi service folder and made appropriate edits along the way.


Your going to have to get into the Cups GUI at http:/localhost:631 and see what the localhost web address is for each printer and copy that into the XML document. I really didn't have to restart any of these print daemons as soon as I saved the text files they became aware of the change. Alexey who wrote one of the guides recommended using a packet sniffer called Wireshark on another windows machine with Bonjour services to find out what your printer type is which your going to need to know for your xml file. Once you have Avahi setup pointing to the appropriate Cups printer its easy as 1-2-3 to start printing from your ipad.


The only problem I had was that Cups-pdf was saving all my pdf print jobs under 'Anonymous' in some obscure folder somewhere on the hard drive. Editing the Cupspdf conf file you can select where you want to save it instead but take note you will have a permission problem in anyone of your home document folders and you will have to allow the others group to have write access or else cupspdf will silently fail. That honestly was the hardest part and when I figured out why I felt so stupid!


Got to say though its so long over due and way cool to be able to print to a pdf or straight to my old HP printer without having to buy a new Apple approved HP printer. Only thing is my little Linux box has to run 24/7 but so far so good as it runs on an external AC adapter anyhow. Here are the links that got me started:





Link to comment
Share on other sites


  • Create New...