I just upgraded my iPad to iOS 4.2.1. As most have figured out by now, AirPrint is not available for printers outside of the chosen few HP printers. So, of course I set out to find a way to make it happen with my Samsung multifunction printer. To my delight, Ubuntu comes with all you need pretty much out of the box. All I had to do was create a printer service file for avahi, make a couple changes to CUPS config, then restart cups and BAM, I'm printing from my iPad.
Okay, so here are the details. This of course assumes that you already have an installed and functioning printer within Ubuntu.
First, let's create the service file for avahi.
sudo pico /etc/avahi/services/printer.service
Insert the following into the file and save by holding the control key then hit O
My Printer
_ipp._tcp
_universal._sub._ipp._tcp
631
txtver=1
qtotal=1
rp=printers/My-Printer-CUPS-Name
ty=My Printer
adminurl=http://198.168.1.4:631/printers/My-Printer-CUPS-Name
note=My Printer
priority=0
product=virtual Printer
printer-state=3
printer-type=0x801046
Transparent=T
Binary=T
Fax=F
Color=T
Duplex=T
Staple=F
Copies=T
Collate=F
Punch=F
Bind=F
Sort=F
Scan=F
pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf
URF=W8,SRGB24,CP1,RS600
The things to change are in red.My Printer can be anything you want. My-Printer-CUPS-Name has to be the name CUPS has assigned to the printer. You can obtain this by going to System -> Administration -> Printing or browsing to CUPS web admin. In Ubuntu's printer manager, it will be whatever is listed underneath the printer image. The IP address in the adminurl should be the IP of the computer that has the printer installed.
Of course you can change the options such as Duplex, etc based on your printers features.
Now, you need to change a couple things with CUPS config.
sudo pico /etc/cups/cupsd.conf
Make sure you have the following:
ServerAlias *
Port 631
Listen /var/run/cups/cups.sock
Now go back to System -> Administration -> Printing and click Server -> Settings. Make sure "Publish shared printers connected to this system" is checked. Click OK. Restart the CUPS server.
sudo /etc/init.d/cups restart
You should now be able to print from the iPad!




Any help?
Thanks for the this tutorial. All printing worked from iPhone & iPad but only thing is it takes about 2-4 minute to print unlike printing via samba. Other than this printing delay, printing is fine.
Does anybody know a setting to improve this?
Thanks
Mathew
Excellent tip, works like a dream. Have blogged my own experiences here -> http://portal2portal.blogspot.com/2011/12/printing-from-ipad-2.html
Thanks its work for my HP 1515n printer from both iphone and ipad.Boss is happy...............
Thanks for the tutorial. I got it working for the most part - I can print from my iphone but the text that is being printed is illegible ie. instead of the proper text it shows mixed up letter and symbols...
Any ideas?
Thanks
AR
Followed the instructions exactly, the avahi daemon noticed the new file and loaded it, cupds does not know of ServerAlias (Unknown directive).
Prints to a Brother HL-5250DN laser.
Thank you for your contribution, i'll pass this on to my friend who doesn't have an Airprint Printer.
Start Prev 1 2 3 4 Next End