* [gentoo-java] OFF-TOPIC: printing in java
@ 2007-05-09 7:29 tramuntanal
0 siblings, 0 replies; 5+ messages in thread
From: tramuntanal @ 2007-05-09 7:29 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hi,
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.orgdocuments. 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.
Can somebody give me a hint about this!
Thanks in advance!
[-- Attachment #2: Type: text/html, Size: 1151 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [gentoo-java] OFF-TOPIC: printing in java
[not found] <200705091400.l49E05JW032177@robin.gentoo.org>
@ 2007-05-10 8:03 ` Robert Wray
2007-05-10 8:51 ` Mario Fetka
2007-05-10 15:14 ` tramuntanal
0 siblings, 2 replies; 5+ messages in thread
From: Robert Wray @ 2007-05-10 8:03 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-java] OFF-TOPIC: printing in java
2007-05-10 8:03 ` [gentoo-java] OFF-TOPIC: printing in java Robert Wray
@ 2007-05-10 8:51 ` Mario Fetka
2007-05-10 15:29 ` tramuntanal
2007-05-10 15:14 ` tramuntanal
1 sibling, 1 reply; 5+ messages in thread
From: Mario Fetka @ 2007-05-10 8:51 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-java] OFF-TOPIC: printing in java
2007-05-10 8:03 ` [gentoo-java] OFF-TOPIC: printing in java Robert Wray
2007-05-10 8:51 ` Mario Fetka
@ 2007-05-10 15:14 ` tramuntanal
1 sibling, 0 replies; 5+ messages in thread
From: tramuntanal @ 2007-05-10 15:14 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
2007/5/10, Robert Wray <Aeriform@shaw.ca>:
>
> Does your printer's name contain a dash?
NO, my printer's name is from error_log:
d [10/May/2007:13:37:29 +0200] POST /printers/lj2430
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
I'm using java 1.6.0.b105
[-- Attachment #2: Type: text/html, Size: 893 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-java] OFF-TOPIC: printing in java
2007-05-10 8:51 ` Mario Fetka
@ 2007-05-10 15:29 ` tramuntanal
0 siblings, 0 replies; 5+ messages in thread
From: tramuntanal @ 2007-05-10 15:29 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 5223 bytes --]
>
>
> 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
>
>
Mario, I've read the url above but I think it's not the problem because I'm
using an old version of CUPS (cups 1.1.22.rc1.9.11) for enterprise
restrictions.
Anyway reading the error log I see the job seems to be sent but the printer
never receives it:
I [10/May/2007:13:37:29 +0200] Started backend /usr/lib/cups/backend/ipp
(PID 53 30) for job 2.
d [10/May/2007:13:37:29 +0200] StartJob: Adding fd 8 to InputSet...
d [10/May/2007:13:37:29 +0200] add_job_state_reasons(0xb7ccf008[6], 2)
D [10/May/2007:13:37:29 +0200] ProcessIPPRequest: 6 status_code=0
d [10/May/2007:13:37:29 +0200] ProcessIPPRequest: Adding fd 6 to
OutputSet...
d [10/May/2007:13:37:29 +0200] WriteClient: Removing fd 6 from OutputSet...
I [10/May/2007:13:37:29 +0200] [Job 2] Connecting to sauron on port 631...
d [10/May/2007:13:37:29 +0200] ReadClient: 6, used=0, file=-1
d [10/May/2007:13:37:29 +0200] ReadClient: httpGets returned EOF...
D [10/May/2007:13:37:29 +0200] CloseClient: 6
d [10/May/2007:13:37:29 +0200] CloseClient: Removing fd 6 from InputSet and
Outp utSet...
I [10/May/2007:13:37:29 +0200] [Job 2] Connected to sauron...
D [10/May/2007:13:37:29 +0200] [Job 2] Getting supported attributes...
D [10/May/2007:13:37:29 +0200] [Job 2] document-format-supported (27 values)
D [10/May/2007:13:37:29 +0200] [Job 2] [0] = "application/octet-stream"
D [10/May/2007:13:37:29 +0200] [Job 2] [1] = "application/pdf"
D [10/May/2007:13:37:29 +0200] [Job 2] [2] = "application/postscript"
D [10/May/2007:13:37:29 +0200] [Job 2] [3] =
"application/vnd.cups-postscript"
D [10/May/2007:13:37:29 +0200] [Job 2] [4] = "application/vnd.cups-raw"
D [10/May/2007:13:37:29 +0200] [Job 2] [5] = "application/vnd.hp-hpgl"
D [10/May/2007:13:37:29 +0200] [Job 2] [6] = "application/x-cshell"
D [10/May/2007:13:37:29 +0200] [Job 2] [7] = "application/x-csource"
D [10/May/2007:13:37:29 +0200] [Job 2] [8] = "application/x-perl"
D [10/May/2007:13:37:29 +0200] [Job 2] [9] = "application/x-shell"
D [10/May/2007:13:37:29 +0200] [Job 2] [10] = "image/gif"
D [10/May/2007:13:37:29 +0200] [Job 2] [11] = "image/jpeg"
D [10/May/2007:13:37:29 +0200] [Job 2] [12] = "image/png"
D [10/May/2007:13:37:29 +0200] [Job 2] [13] = "image/tiff"
D [10/May/2007:13:37:29 +0200] [Job 2] [14] = "image/x-bitmap"
D [10/May/2007:13:37:29 +0200] [Job 2] [15] = "image/x-photocd"
D [10/May/2007:13:37:29 +0200] [Job 2] [16] = "image/x-portable-anymap"
D [10/May/2007:13:37:29 +0200] [Job 2] [17] = "image/x-portable-bitmap"
D [10/May/2007:13:37:29 +0200] [Job 2] [18] = "image/x-portable-graymap"
D [10/May/2007:13:37:29 +0200] [Job 2] [19] = "image/x-portable-pixmap"
D [10/May/2007:13:37:29 +0200] [Job 2] [20] = "image/x-sgi-rgb"
D [10/May/2007:13:37:29 +0200] [Job 2] [21] = "image/x-sun-raster"
D [10/May/2007:13:37:29 +0200] [Job 2] [22] = "image/x-xbitmap"
D [10/May/2007:13:37:29 +0200] [Job 2] [23] = "image/x-xpixmap"
D [10/May/2007:13:37:29 +0200] [Job 2] [24] = "text/html"
D [10/May/2007:13:37:29 +0200] [Job 2] [25] = "text/plain"
D [10/May/2007:13:37:29 +0200] [Job 2] [26] = ""
D [10/May/2007:13:37:29 +0200] [Job 2] printer-uri =
"ipp://sauron:631/printers/ lj2430"
D [10/May/2007:13:37:29 +0200] [Job 2] requesting-user-name = "oliver"
D [10/May/2007:13:37:29 +0200] [Job 2] job-name = "Java Printing"
I [10/May/2007:13:37:29 +0200] [Job 2] Print file accepted - job ID 14647.
I [10/May/2007:13:37:29 +0200] [Job 2] Waiting for job to complete...
d [10/May/2007:13:37:29 +0200] UpdateCUPSBrowse: (126 bytes from
192.168.0.222) 9016 4 ipp://sauron:631/printers/lj2430 "" "lj2430" "HP
LaserJet 2430 Foomatic/h pijs" job-sheets=none,none lease-duration=300
d [10/May/2007:13:37:30 +0200] select_timeout: 11 seconds to process active
jobs
d [10/May/2007:13:37:30 +0200] UpdateCUPSBrowse: (126 bytes from
192.168.0.222) 9016 3 ipp://sauron:631/printers/lj2430 "" "lj2430" "HP
LaserJet 2430 Foomatic/h pijs" job-sheets=none,none lease-duration=300
d [10/May/2007:13:37:31 +0200] select_timeout: 11 seconds to process active
jobs
d [10/May/2007:13:37:32 +0200] UpdateCUPSBrowse: (122 bytes from
192.168.0.80) 2 0006 3 ipp://as1:631/printers/lj2430 "" "Impressora en brut"
"Local Raw Printer" job-sheets=none,none lease-duration=300
d [10/May/2007:13:37:33 +0200] select_timeout: 11 seconds to process active
jobs
d [10/May/2007:13:37:39 +0200] PID 5330 exited with no errors.
D [10/May/2007:13:37:39 +0200] UpdateJob: job 2, file 0 is complete.
d [10/May/2007:13:37:39 +0200] UpdateJob: Removing fd 8 from InputSet...
D [10/May/2007:13:37:39 +0200] CancelJob: id = 2
D [10/May/2007:13:37:39 +0200] StopJob: id = 2, force = 0
D [10/May/2007:13:37:39 +0200] StopJob: printer state is 3
d [10/May/2007:13:37:39 +0200] StopJob: Freeing status buffer...
d [10/May/2007:13:37:39 +0200] SaveJob: Closing file 8...
d [10/May/2007:13:37:39 +0200] SaveJob: Closing file 8...
As i see this topic is too off-topic I'll move it to the cups forum (I
didn't knew it exists).
Thanks to all for your support, it's good to see people helps each other!
[-- Attachment #2: Type: text/html, Size: 6229 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-10 15:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200705091400.l49E05JW032177@robin.gentoo.org>
2007-05-10 8:03 ` [gentoo-java] OFF-TOPIC: printing in java Robert Wray
2007-05-10 8:51 ` Mario Fetka
2007-05-10 15:29 ` tramuntanal
2007-05-10 15:14 ` tramuntanal
2007-05-09 7:29 tramuntanal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox