Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 08:40:28 -0600
From:      Nate Williams <nate@mt.sri.com>
To:        Sean Reilly <sreilly@seanreilly.com>
Cc:        Nate Williams <nate@mt.sri.com>, freebsd-java@FreeBSD.ORG
Subject:   Re: Error code 512 when printing
Message-ID:  <199908111440.IAA27950@mt.sri.com>
In-Reply-To: <Pine.BSF.4.05.9908110740280.1764-100000@keywest.seanreilly.com>
References:  <199908110347.VAA26597@mt.sri.com> <Pine.BSF.4.05.9908110740280.1764-100000@keywest.seanreilly.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > Using JDK1.1.8 on FreeBSD-3.1-RELEASE, when I try an print anything from a
> > > java program directly to a printer, I just get a dialog that says "Error
> > > code 512:" and nothing prints.
> > 
> > How are you printing from your Java program?
> 
> I get a java.awt.PrintJob object via the toolkit's
> getPrintJob(Frame,String,Properties) method.

I don't know if this has ever been tested.  I don't know if the Xprint
stuff even works outside of java.

  Once I have the printjob, I
> call getGraphics() and draw directly to that graphics object.  In case it
> helps, here are the properties that are being sent to the getPrintJob
> method call:
> 
> awt.print.fileName=checks.ps
> awt.print.numCopies=1
> awt.print.printer=lj5p
> awt.print.paperSize=letter
> awt.print.destination=file
> awt.print.orientation=portrait
> 
> Again, everything works fine when I print to a file, and I can print from
> this machine just fine otherwise.  In case it matters, lj5p is a remote
> printer on another freebsd machine.  Printing using the linux JDK to this
> printer works fine as well.

Hmm, I don't know how this works at all, so I can't test it.  Can you
send a simple application that does what you want that demonstrates the
problem?


Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908111440.IAA27950>