From owner-freebsd-java Wed Aug 11 5:12: 6 1999 Delivered-To: freebsd-java@freebsd.org Received: from keywest.seanreilly.com (reillys.erols.com [207.96.124.186]) by hub.freebsd.org (Postfix) with ESMTP id 0E0FD154B4 for ; Wed, 11 Aug 1999 05:12:03 -0700 (PDT) (envelope-from sreilly@seanreilly.com) Received: from localhost (localhost.seanreilly.com [127.0.0.1]) by keywest.seanreilly.com (8.9.2/8.9.2) with ESMTP id IAA02795; Wed, 11 Aug 1999 08:11:35 -0400 (EDT) (envelope-from sreilly@seanreilly.com) Date: Wed, 11 Aug 1999 08:11:35 -0400 (EDT) From: Sean Reilly To: Nate Williams Cc: freebsd-java@FreeBSD.ORG Subject: Re: Error code 512 when printing In-Reply-To: <199908110347.VAA26597@mt.sri.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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. 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