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

Thanks,
Sean




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?Pine.BSF.4.05.9908110740280.1764-100000>