Java Printing Problems

Discussion in 'Installation/Configuration' started by anw, Apr 12, 2009.

  1. anw

    anw New Member

    Well, I've had a terrible time getting my printer working after I upgraded my system to all the latest & greatest. Some details of the travail are here. While most of that is behind me, I still have one significant problem: I have Moneydance, a java app, that can't print. Since this is how all my bills are paid (and checks written), this is a major problem, but is (I think) a generic java printing problem.

    I have tried from version Java-1.4 to Java-6 from Sun, java-6 from IBM (I heard IBM's printing was much more robust), can't download anything before java-6 from IBM (they seem to be having a server problem), openjdk-6, and The GNU Compiler Collection (gcj 4.3), all of them either do absolutely nothing, pop up a dialog that says something like PrinterIOException, or pop up a dialog that says "No printer service found".

    I have also looked all over the web for this, and, except for a solution involving "mv /usr/lib/cups" and using different java runtimes, can't find a solution.

    Does anyone have any insight into how to fix this, or a java package that prints?

  2. anw

    anw New Member

    I have found something out. Evidently, java uses lpr to print, which is unnecessary in most (all?) other systems. I was printing fine except for java, then found a java program (jedit) that printed out more info regarding its exception, and the problem was not finding lpr.

    Now, when using lpr, it wants to use a ghostscript line like this:
    This is not the gs line that appears in the G85.ppd in /etc/cups/ppd/G85.ppd, which is:
    Notice one difference: the first (which doesn't work) has "-dBitsPerPixel", which is absent in the second. If I "print to file", then pipe the file through the first one, I get an error which says "rangecheck in .putdeviceprops". If I remove the "-dBitsPerPixel", then do the same thing, it prints.

    So, now the question is, where does lpr get its gs command line so I can change it? Anyone out there have a clue?

  3. anw

    anw New Member

    I found the problem. Somehow, in the midst of all the upgrading, I lost the BSD print stuff (lpr, etc.). I discovered this, then reinstalled lpr, which didn't work. I should have reinstalled "cups-bsd", which has BSD print interface to CUPS.

Share This Page