From owner-freebsd-java Wed Aug 11 7:40:56 1999 Delivered-To: freebsd-java@freebsd.org Received: from ns.mt.sri.com (ns.mt.sri.com [206.127.79.91]) by hub.freebsd.org (Postfix) with ESMTP id 129DB156A7 for ; Wed, 11 Aug 1999 07:40:47 -0700 (PDT) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id IAA02971; Wed, 11 Aug 1999 08:40:29 -0600 (MDT) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id IAA27950; Wed, 11 Aug 1999 08:40:28 -0600 Date: Wed, 11 Aug 1999 08:40:28 -0600 Message-Id: <199908111440.IAA27950@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Sean Reilly Cc: Nate Williams , freebsd-java@FreeBSD.ORG Subject: Re: Error code 512 when printing In-Reply-To: References: <199908110347.VAA26597@mt.sri.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@mt.sri.com (Nate Williams) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > > 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