Coder Social home page Coder Social logo

android-print-plugin-cups's Introduction

android-print-plugin-cups

CUPS print plugin for Android.

There are many other print plugins like this one, however I did not find any open-source plugins, most of them have outrageous prices, and the only free plugin failed to work with Android printing framework.

In my opinion, printing support shall be a freely-available part of the OS, that's also the reason why I chose GPL as a license for this plugin.

This plugin unpacks minimal Debian installation with CUPS included, and launches it using PRoot, then uses it for actual printing.

To generate Debian image, download repo https://github.com/pelya/cuntubuntu and launch script img-cups-jessie.sh from img directory.

You will need to do this from Debian/Ubuntu, and install few packages, specified in it's readme file.

PRoot can be downlaoded from http://proot.me/

Other than these things, the plugin contains only Java code, and no other magic.

There is no JNI or other weird stuff - Java code just calls lp, lpinfo, lpadmin etc commandline tools.

I hate Java and dislike IDEs, so you'll have to put up with my coding style, sorry. Don't ask me how to import this project into Android Studio or Eclipse.

TODO:

  • Selected printer disappears in 10 seconds on Android Lollipop, print dialog stops working
  • Add support for 64-bit architectures
  • Implement AdvancedPrintOptionsActivity:
  • Page margins
  • Collate copies
  • Resize print content to fit into less amount of pages, by reporting bigger paper size and rescaling it back when printing
  • All options configurable by lpoptions:
  • Paper type
    
  • Printer tray select
    
  • Print resolution
    
  • Booklet print
  • Print preview:
  • Show or hide print preview in advanced options
  • Change page margins inside print preview
  • Select and de-select pages for print preview
  • USB printers support, by forwaring calls from libusb to Java
  • Print on older devices and from older apps, using 'Share' button
  • Connect to non-local CUPS server: https://www.cups.org/documentation.php/doc-1.7/ref-client-conf.html
  • Command-line interface into CUPS installation
  • Add non-Samba printer by URL, share non-Samba printer
  • Search for IPP and Bonjour printers using cups-browsed
  • When printing to CUPS server, CUPS web interface shows an error: "Failed to connect to system bus"
  • Set LANG to make CUPS print localized error messages
  • When printing page range and multiple copies, CUPS collates pages and we don't want that

android-print-plugin-cups's People

Contributors

pelya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.