For those of you that have upgraded to iOS 6, you may have discovered that myÂ AirPrint tutorialÂ no longer works. This results from the fact that URF is the required format, and the PDF container relied on previously cannot render pages from an iOS 6 device. To fix this you need to compile theÂ urftopdf filter for CUPS and modify your AVAHI configuration accordingly.
Let me preface this by saying these instructions assume Ubuntu Server. Additionally, unlike my previous instructions this does require development tools and a little bit more hacking.
1. Install Pre-Requisits. You are going to need to compile a filter for CUPS; to do this the libcups library is required. Unfortunately, this cannot currently be installed directly using the CUPS development libraries for Ubuntu as a result of a downstream dependency error. However, the Linux Standard Base (LSB) libraries will include this for you:
apt-get install build-essential
apt-get install lsb-build-base3
After installing, you will need to fake out the cups include directory:
$ cd /usr/include
$ ln -s lsb3/cups .
Finally, the library version is currently at 2 which requires another tweak so that we can link directly:
$ cd /usr/local/bin/
$ ln -s libcups.so.2 libcups.so
2. Install libHaru. This is a PDF library and can be downloaded from http://libharu.org/wiki/Downloads. It can be easily compiled and installed on Ubuntu, you may cut and paste the following and execute at a command prompt:
$ wget http://libharu.org/files/libharu-2.2.1.tar.gz
$ tar zxvf libharu-2.2.1.tar.gz
$ cd libharu-2.2.1/
$ ./configure && make
$ sudo make install
3. Download urftopdf and compile. This is the most critical part, and is contingent on the previous steps. You can find this on GitHub at https://github.com/superna9999/urftopdf or you may refer to the following:
$ git clone https://github.com/superna9999/urftopdf.git
$ cd urftopdf
$ sudo ./install_pdf.sh
During the build process, pay particular attention to the output of
make. Since there is no standard configuration script, any kind of build failure presents itself here; this is a typical result of compiling urftopdf on an x86_64 Ubuntu server with Linux kernel 2.6.32:
cc urftopdf.c -lhpdf -lcups -o urftopdf -lm
urftopdf.c: In function â€˜mainâ€™:
urftopdf.c:327: warning: comparison between pointer and integer
4. Update URF Text Record in AVAHI Printer Configuration. In your AVAHI printer configuration file(s), either update or add the following <txt-record/>
In most cases, your AVAHI printer definitions can be found in
5. Update MIME Type in AVAHI Printer Configuration. Within the same printer configuration file(s), ensure the following record exists with these MIME types:
6. Restart CUPS and AVAHI.
That should do it. From your iOS 6 device the printers on your Linux server will be visible and you can once again print. As previously noted, this has the added benefit that the AirPrint devices can also be shared with your Mac OS X computers.