Page 1 of 1

How do I share my printer through AirPrint? [Solved]

Posted: Tue Oct 16, 2012 8:46 pm
by greenamit
Hi,

I am trying to enable AirPrint on Linux Mint 13 with CUPS 1.5.3.
I followed the instructions above, was able to print the test page.
I then went to the "Administration" tab and enabled "Share printers connected to this system" and saved it via "Change Settings". CUPS server was restarted after that.
However, when I'm on my iPhone/iPad I can see any printer: "No AirPrint Printers Found".

Attached are my CUPS settings:
Officejet-J6400-series - CUPS 1.5.3.png
Administration - CUPS 1.5.3.png
What am I missing?

Thanks,
Amit

AirPrint

Posted: Wed Oct 17, 2012 8:56 am
by greenamit
Hi,

I followed the instructions in this thread about how to configure CUPS to allow iOS devices to print via AirPrint.
However, none of my iOS devices find the printer. This is how it's configured for me:
http://forums.linuxmint.com/viewtopic.p ... 00#p619808

Can you please advise what's missing?

Thanks

Re: How do I share my printer through AirPrint?

Posted: Wed Oct 17, 2012 9:25 am
by xenopeek
First post split from http://forums.linuxmint.com/viewtopic.php?f=42&t=103900, and merged with second post as this is about the same question.

This is not a support forum for iOS devices. So the most obvious question first, do any other computers or devices find the printer you are sharing? This can be just a limitation of the iOS devices.

Re: How do I share my printer through AirPrint?

Posted: Wed Oct 17, 2012 9:55 am
by altair4
The question is are you running with iOS6 or something earlier?

In iOS5 everything worked as it should as long as you shared and enabled your printer because AirPrint support was bullt into CUPS. IOS6 changed that. There's an Ubuntu bug report of this subject: https://bugs.launchpad.net/ubuntu/+sour ... ug/1054495

Note: The original bug report was for AirPrint and Ubuntu 12.04. It was closed as a fix was released for 12.10. In 12.04 - an LTS release - it's still broken. Remember that when you think about keeping an LTS version of Ubuntu / Mint. 5 year support is open for interpretation.

If it's iOS6 I can tell you what worked for me and believe me it's not pretty:

[1] Install the following package:

Code: Select all

sudo apt-get install python-lxml
[2] Download a python script that will be used to extract printer information and build the avahi printer services:
https://github.com/tjfontaine/airprint- ... /downloads

[3] Extract the downloaded tar.gz file.

[4] Open a Terminal and change to the download directory and run the python script:

Code: Select all

./airprint-generate.py
[5] Copy the avahi printer service file to the avahi services directory. For example:

Code: Select all

sudo cp AirPrint-HP970.service /etc/avahi/services
Note: It adds "AirPrint" in front of your existing printer name.

[6] Edit the *.services file as root:

Code: Select all

gksu gedit AirPrint-HP970.service
Change this line:
<txt-record>URF=none</txt-record>
To this:
<txt-record>URF=DM3</txt-record>

Then change this:
<txt-record>pdl=application/octet-stream,application/pdf,application/postscript,application/vnd.cups-raster,image/gif,image/jpeg,image/png,image/tiff,text/html,text/plain,application/vnd.adobe-reader-postscript,application/vnd.cups-pdf</txt-record>
To this:
<txt-record>pdl=application/octet-stream,application/pdf,application/postscript,application/vnd.cups-raster,image/gif,image/jpeg,image/png,image/tiff,image/urf,text/html,text/plain,application/vnd.adobe-reader-postscript,application/vnd.cups-pdf</txt-record>

[7] Create 2 new files

Code: Select all

gksu gedit /usr/share/cups/mime/airprint.convs
Add this content:

Code: Select all

#
# "$Id: $"
#
# AirPrint
# Updated list with minimal set 25 Sept
image/urf application/pdf 100 pdftoraster
#
# End of "$Id: $".
#

Code: Select all

gksu gedit /usr/share/cups/mime/airprint.types
Add this content:

Code: Select all

#
# "$Id: $"
#
# AirPrint type
image/urf urf string(0,UNIRAST<00>)
#
# End of "$Id: $".
#
[8] Restart the avahi and cups services:

Code: Select all

sudo service cups restart
sudo service avahi-daemon restart

Re: How do I share my printer through AirPrint? [Solved]

Posted: Wed Oct 17, 2012 1:11 pm
by greenamit
WOW!!!

Spot on!

I am on iOS 6 (all my devices). I did your above instructions and it works!!
Thank you!

Re: How do I share my printer through AirPrint? [Solved]

Posted: Thu Nov 15, 2012 9:48 pm
by biglebronski
Thank you very much sir. You've made my day. :D

Re: How do I share my printer through AirPrint? [Solved]

Posted: Thu Dec 06, 2012 3:33 am
by ariberlari
I tried this solution, and nothing appears in my ipad 2 (iOS 5.1.1), CUPS 1.5.0 already set and shared, printing test page works from linux mint 12.
But the printer discover still not working and my ipad cant detect the printer.

Did i miss something?