Re: OFF-TOPIC: printing in java
Mario Fetka <[email protected]>
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Organization | Privat |
| Message-ID | <[email protected]> |
Am Donnerstag, 10. Mai 2007 10:03:25 schrieb Robert Wray:
> Does your printer's name contain a dash?
> If you're using jdk 1.6 a dash in your printers name might cause what
> you're seeing. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6252456
>
> Are you using java version 1.4 or earlier?
> Java 1.5 and later native support CUPS, earlier versions used lp commands.
>
> ---------------------------------------------------
> 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. The
> question is has anybody get success in printing in java+linux? I use CUPS
> and it works when printing pdfs, text and OpenOffice.org documents. But
> when I try something like this:
>
> if (pJob.printDialog()) {
> pJob.setPrintable(printableDocument, new PageFormat());
> try {
> pJob.print();
> } catch (PrinterException printerException) {
> System.out.println("Error Printing Document");
> }
> }
>
> 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.
i also had the same problem with cups 1.2 its a problem with the new cups
defaults
more Here
http://www.cups.org/articles.php?L433+I0+TFAQ+M10+P1+Qjava
i think this is the reason for your problem.
wfg
MArio
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) iD8DBQBGQt0QZjn0C02nCw8RAsELAJ4p770b9e3f0Vs3JvkZ0BDWsc4gSACffpIR iSyXvkBkDmcQQ3xb3OPsBxA= =uq6S -----END PGP SIGNATURE-----