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

Forum rules
Before you post please read this
Post Reply
greenamit
Level 1
Level 1
Posts: 5
Joined: Wed Oct 10, 2012 8:41 am

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

Post by greenamit » Tue Oct 16, 2012 8:46 pm

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
Officejet-J6400-series - CUPS 1.5.3.png (38.96 KiB) Viewed 6268 times
Administration - CUPS 1.5.3.png
Administration - CUPS 1.5.3.png (60.96 KiB) Viewed 6268 times
What am I missing?

Thanks,
Amit
Last edited by greenamit on Thu Oct 18, 2012 7:58 am, edited 1 time in total.

greenamit
Level 1
Level 1
Posts: 5
Joined: Wed Oct 10, 2012 8:41 am

AirPrint

Post by greenamit » Wed Oct 17, 2012 8:56 am

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

User avatar
xenopeek
Level 24
Level 24
Posts: 22634
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How do I share my printer through AirPrint?

Post by xenopeek » Wed Oct 17, 2012 9:25 am

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.
Image

altair4
Level 19
Level 19
Posts: 9150
Joined: Tue Feb 03, 2009 10:27 am

Re: How do I share my printer through AirPrint?

Post by altair4 » Wed Oct 17, 2012 9:55 am

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
Last edited by altair4 on Wed Oct 17, 2012 1:30 pm, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

greenamit
Level 1
Level 1
Posts: 5
Joined: Wed Oct 10, 2012 8:41 am

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

Post by greenamit » Wed Oct 17, 2012 1:11 pm

WOW!!!

Spot on!

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

biglebronski
Level 1
Level 1
Posts: 1
Joined: Thu Nov 15, 2012 9:45 pm

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

Post by biglebronski » Thu Nov 15, 2012 9:48 pm

Thank you very much sir. You've made my day. :D

ariberlari
Level 1
Level 1
Posts: 7
Joined: Thu May 10, 2012 1:16 am

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

Post by ariberlari » Thu Dec 06, 2012 3:33 am

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?

Post Reply

Return to “Printers & Scanners”