Reinhard Simon wrote:
>
> I want to print a Canvas with a picture (gif) directly from a frame.
> So I use a Printjob, but it does not work on both of my linux-systems.
> After the frame Print Dialog, I get a frame "Print Error" with
> the message : Could not execute pring command (L_java.lang.String...)
> If I write the output to a file and pipe it into lpr it works, but it
> is no solution.
I can't help you much with java-linux printing, but some general
java-printing advice: don't beat it too hard, since it's pretty broken.
We dumped direct printing from our product since under Win32 JDK (our
usual deployment platform) it tended to crash the application completely
about 1/2 the time. In general, it was a real pain to code too...
Now, we take snapshots, dump them as PNG images (better JDK native
support through zlib than gif), spit out some HTML that references them,
and launch Netscape. This has worked really well. It sounds roundabout,
but has given us more flexibility in the long run - the HTML template is
stored in configuration files and can be different for each of our
customers.
Fixing printing is high on the list at Sun's bug parade; I suspect 1.2
will address this. But under 1.1 it is one of the, shall we say, less
mature bits of the java core API.
--
Paul Reavis [EMAIL PROTECTED]
Design Lead
Partner Software, Inc. http://www.partnersoft.com