Gentoo Archives: gentoo-java

From: Robert Wray <Aeriform@××××.ca>
To: gentoo-java@l.g.o
Subject: RE: [gentoo-java] OFF-TOPIC: printing in java
Date: Thu, 10 May 2007 08:04:10
Message-Id: d011e48d5324.46427d6d@shaw.ca
1 Does your printer's name contain a dash?
2 If you're using jdk 1.6 a dash in your printers name might cause what you're seeing.
3 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6252456
4
5 Are you using java version 1.4 or earlier?
6 Java 1.5 and later native support CUPS, earlier versions used lp commands.
7
8 ---------------------------------------------------
9 The title of this message is "OFF-TOPIC" because it's not a thing only related with Gentoo but related to the Linux Java implementation.
10 The question is has anybody get success in printing in java+linux?
11 I use CUPS and it works when printing pdfs, text and OpenOffice.org documents. But when I try something like this:
12
13 if (pJob.printDialog()) {
14 pJob.setPrintable(printableDocument, new PageFormat());
15 try {
16 pJob.print();
17 } catch (PrinterException printerException) {
18 System.out.println("Error Printing Document");
19 }
20 }
21
22 the print dialog appears I select the correct printer and it seems that everitying works but when the document enters into the queue it's in the state printing and then automatically it changes to stoped. At no moment the printer really receives the document.

Replies

Subject Author
Re: [gentoo-java] OFF-TOPIC: printing in java Mario Fetka <mario-fetka@×××.at>
Re: [gentoo-java] OFF-TOPIC: printing in java tramuntanal <tramuntanal@×××××.com>