A collection of thoughts, ramblings and experience of making technology work for me. It may include some further diversions.

iOS AirPrint without a true AirPrint compatible device

My latest iOS mission has been to enable Apple AirPrint introduced in iOS 4.2 to work with non AirPrint printers. At the time of writing I am only aware of HP printers that are AirPrint compatible out if the box; therein lies the problem since poor experience with HP and Canon consumer printers in the 90's has left me a staunch Epson owner ever since.

Epson at the moment have no AirPrint enabled devices available and have taken the stance that they will not be retrospectively updating firmware for existing models to enable AirPrint support. I've only recently acquired several variants of the Epson SX600FW family which have been great to date, so being keen to maximise their potential I spent an hour or two 'enabling' AirPrint compatibility using an Ubuntu server to act as an AirPrint server. Read on...

Setup

Epson SX600FW connected wirelessly to a WRT-54GL router

iPhone 3GS running iOS 4.3.3

Ubuntu 10.04 server which acts as the AirPrint server

My point of reference wasthis blog by Ryan Finnie that researched and walks through AirPrint and Linux in a lot more detail than I am about too. This AirPrint solution cannot be installed onto the Epson printer at this time but relies on a separate Ubuntu server to listen for the AirPrint jobs and to send them to the printer.

Here's what to do:

1. Add your printer to the Ubuntu Server

Goto System > Administration > Printing > And click Add Printer.

Select ‘Network Printer’ and 'Find Network Printer'

For me Ubuntu then automatically found and installed the appropriate driver, your mileage may vary

Eventually click ‘Apply’ to finish.

2. Check that CUPS is in installed, if not you will need to install CUPS. You will need to have a PDF filter working correctly. Debian (Ubuntu) seems to provide this out of the box with a CUPS install;dpkg -s cups | grep Statussudo apt-get install cups

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""

#Remove leading slashes from path
#TODO XXX FIXME I'm worried this will match broken urlparse
#results as well (for instance if they don't include a port)
#the xml would be malform'd either way
rp = re.sub(r'^/+', '', rp)