15

How to print from Android to CUPS (running on another computer in the LAN)?

(CUPS (Common Unix Printing System/Server) is of course already set up to accept requests over the LAN.)

Preferably, without relying on proprietary software.

  • 1
    without the help of other tools: unlikely. With the help of other tools: check "cups print" on Google Play. I was surprised there really seem to be any CUPS clients around -- didn't expect that... – Izzy Apr 16 '13 at 21:45
3

I have recently released an Android app based on (a modified) version of Cups4J. Communication is via http/https. The main thing I had to/opted to change from the java library was a dependency on JAXB for XML processing (a. I felt it too heavy b. Android does not have this javax lib and importing it apparently involves repackaging) relying instead on some hard coding.

Download Android CUPS Printing on the Play Store or get the sources on GitHub.

  • 2
    Have a look at f-droid.org and their forum which welcomes submission of open-source apps for Android. The community there--I hope--will be friendly enough to help you to package your source code in a nice manner, so that it is easy to read and reproduce your build procedure. If you wish to publish it, please, open a new topic at the forum there, and hopefully you'll get help and contributions (patches) from the community, so that your project will be enabled to live and develop further! A prerequisite is that you put your source code into Git. If I have time, I'll also try to help you. – imz -- Ivan Zakharyaschev Apr 22 '13 at 14:27
  • That's great that you've created an app for printing to CUPS! Something that has been missing me. I'll report back when I try it. – imz -- Ivan Zakharyaschev Apr 22 '13 at 15:00
  • 1
    Just noting. I still need to get my head round Git but for now everything I have done can be reached at mobd.jonbanjo.com/jfcupsprint/licence.php. There are 2 files, cups4jpatched.zip and jfcupsprint.zip – Jon Apr 24 '13 at 6:36
  • I believe I have fixed the problem with spinners that caused me to withdraw the app. The app is now back on Google Play – Jon Jul 19 '13 at 11:28
  • 2
    I took the liberty of taking the sources of this project, convert them to gradle and host them at github. All contributions welcome at: github.com/BenoitDuffez/JfCupsPrint (also, I added the print service so that you can add printers to Android directly). KitKat required. – Benoit Duffez Jun 5 '15 at 20:56
2

I have a USB printer attached to a Windows machine and my Linux server sees that over SMB and publishes that via CUPS (be sure to "share...".)

For Android, there's Let's Print Droid - complete with a print service so all apps see it. It takes about two minutes to set up.

  • I have a google/cups-connector printserver running on an Ubuntu computer (smb server on router). The chromebook prints fine from this network printer but this app was the only thing that would get it to print on android. – mchid May 22 '16 at 20:56
2

You can now set up CUPS for IPP Everywhere. It should then directly show up in your Android, Chromebooks, and maybe even iPhone printer menus. The other answers are outdated for reasonably new systems: CUPS 1.5+ and Android 4.4+ or an IPP Everywhere printer is required. For Apple AirPrint CUPS 2.2.2 is required. Debugging the functionality can be a bit difficult though.

1

It seems there are no native Android CUPS clients, which are free software.

The only way that can be found is rather clumsy, via a Debian installation on the Android device -- http://code.google.com/p/android/issues/detail?id=1148#c41. But using a Debian (or another distro) installation like LilDebi (for example) would definitely require root (in order to chroot)! That's not convenient for those who don't want to root the device (just to be able to print). (BTW, aren't there, besides chroot, any more modern alternative isolation technologies implemented in Linux that wouldn't require root?.. Perhaps, LXC?)

Another app (Remote CUPS) requires SSH access to the server.

ObPrint doesn't appear to be open-source.

Let's Print Droid likewise doesn't appear to be open-source.

1

I think you could try Shared printer app from pelya available at play store. It is a cups installation for android. I hope it works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.