3

I am looking to program an Android app which is simply a print driver that converts a file to postscript and/or PCL and then sends it to a network printer. My first concern is printing pdf files. Do any of you know of a Java (or I guess I could use C/C++ and JNI) library for converting pdf to PS/PCL? The key issue here is that I can't use any of the built-in Java print libraries, since those aren't included on Android.

I don't have any ambition to sell the app, or distribute it under my name, or anything of that nature, so if you can point me to some open-source converters which I can use directly, that would be great.

peterh
  • 11,875
  • 18
  • 85
  • 108
erock2112
  • 139
  • 4
  • 10
  • You could begin by splitting it into logically separate subtasks - I'm pretty sure you'll get more useful answers to "how do I convert to PS" and "how do I upload to FTP" than to a combination of both. – Piskvor left the building Feb 03 '11 at 10:04
  • Android does not have "print drivers" without substantial firmware modifications. Your desired feature ("convert a file to postscript") is not a "driver". A "'universal' postscript converter" is impossible, no different than a "'universal' MP3 converter" could turn a photo into an MP3 file. – CommonsWare Feb 03 '11 at 13:39
  • 1
    I should have been more clear. The app would consist of a service, which would be available to other applications, and then an application front-end, in which the user can choose a file to print, choose the network address of the printer, etc. This question is concerned with _what_ to send to the printer and not _how_ to send it. @CommonsWare: So, I'll need to write (or find) a converter for each file type I want to support? – erock2112 Feb 03 '11 at 21:36
  • "So, I'll need to write (or find) a converter for each file type I want to support?" -- yes. That's how it works in the rest of the world. You will notice that there is no "universal postscript thingamabob" for Windows, Linux, or OS X, either. On a desktop-style OS, apps like Word or Impress speak to a print driver API, for which there may be a Postscript implementation on a given machine...but only Word knows how to print Word files, and only Impress knows how to print Impress files. Conversion to Postscript directly is not significantly different. – CommonsWare Feb 03 '11 at 22:01

1 Answers1

0

The "send to a network printer" part of this question is a duplicate of existing Stack Overflow questions, Printing API in Android and Android Printing API on Galaxy Tab.

The answer, thanks to Horcrux7 in August 2011:

Currently there are some bad working third party apps. Nothing is a professional solution.... All which need a printing API in Android should vote for it.

Community
  • 1
  • 1
Jim DeLaHunt
  • 10,960
  • 3
  • 45
  • 74