LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-11-2009, 06:46 PM   #1
anw
Member
 
Registered: Sep 2003
Location: Florida
Distribution: Debian
Posts: 94

Rep: Reputation: 15
Java Printing Problems


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 java.xxx.awt 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?

TIA
 
Old 04-11-2009, 07:47 PM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
can it print to file?
print to postscript
and then print from a postscript reader?
as an emergency workaround.
 
Old 04-12-2009, 12:47 PM   #3
anw
Member
 
Registered: Sep 2003
Location: Florida
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: 15
I'm not sure how to make it print to a file. I'm using the KDE desktop, and that printer dialog lets me do that for KDE applications only. As far as Moneydance is concerned, it's not a KDE app, and when I try it anyway, it doesn't give me any options for printing (I assume it just prints to the default printer). Using the localhost:631 interface in my browser, it also doesn't give me the option to print to a file.
 
Old 04-13-2009, 05:52 PM   #4
anw
Member
 
Registered: Sep 2003
Location: Florida
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: 15
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:
Quote:
gs -sstdout=%stderr -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -r300x300 -sDEVICE=cdj550 -dBitsPerPixel=3 -sOutputFile=%stdout -_
This is not the gs line that appears in the G85.ppd in /etc/cups/ppd/G85.ppd, which is:
Quote:
*FoomaticRIPCommandLine: "gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -r300x300 -sDEVICE=cdj550%A%Z -sOutputFile=- -"
*End
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?

TIA-
 
Old 04-15-2009, 08:08 PM   #5
anw
Member
 
Registered: Sep 2003
Location: Florida
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: 15
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.
 
Old 04-21-2009, 12:32 PM   #6
vbnaik
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
Printing in java

Printing in java has become trivial now, check out the sun's web site to print a doc using java.
 
Old 04-21-2009, 12:34 PM   #7
vbnaik
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
OR

check out the basic steps to print a doc using java.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
printing using java jeyram Linux - Software 0 04-02-2008 09:10 AM
java applet printing husrah Linux - General 1 11-16-2007 01:46 PM
Printing of Java Applets ureyes Linux - General 3 05-03-2006 04:24 PM
Java printing problem arubin Programming 0 11-13-2005 03:27 AM
Java Printing yenonn Programming 1 05-06-2003 10:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration