Article View: borland.public.jbuilder.java.language
Article #17376Re: Remembering PrintJob properties
From: Richard Wilkman
Date: Mon, 16 Nov 1998 00:00
Date: Mon, 16 Nov 1998 00:00
80 lines
3984 bytes
3984 bytes
Ross: Well, it does print -- it just doesn't implement persisting print job properties. There are a few things that are in Java that are not or can not be implemented on the Win32 platform. Some of this is being addressed in 1.2 by removing the dependenance on the host platform for doing some of these tasks. -Rich Ross M. Dukeshier wrote: > > John P. McGrath wrote: > > > > Ross M. Dukeshier <dukeman@flash.net> wrote: > > > > > I'm trying to set up a program that will store a user's default printer > > > properties including which printer to print to (printers are networked). > > > > > > I get the impression from the JDK documentation and the Java in a > > > Nutshell books that the Properties object you pass to the getPrintJob > > > method (of the Toolkit class) is supposed to be "persistent". Unless > > > I'm missing something, Java passes parameters by value so I won't get > > > the Properties object back and I haven't found a method that will get me > > > the properties from the PrintJob object. The only persistency I see is > > > while the program is running and after the user has selected the printer > > > information once during that session. > > > > > > The questions: > > > > > > Is there any way to find out the properties selected for a PrintJob > > > object? Do PrintJob's have a standard set of properties? > > > > > > If not, is there any way other than serializing the PrintJob object to > > > maintain that information beyond the current program execution? > > > > I hate to burst your bubble, but you are not going to be able to do > > any of this with the Java PrintJob class. For starters, on Windows, > > PrintJob completely ignores the "properties". They just plain do not > > work. Also, PrintJob does not even provide basic information, such as > > what portion of the printed page you can print on. > > > > With JDK 1.1.7, it has just gotten to the point where you can create > > printed output without the blowing off the JVM (1.1.6 _will_ blow it > > away). There may be some relief with JDK 1.2, but I have heard it is > > still pretty pitiful. > > > > -- > > Regards, > > > > John P. McGrath > > <mcgrath@enter.net> > > <jpm@nscs.fast.net> > That's not comforting by any stretch. Just for clarification, what do > you mean by blowing off the JVM? What does it do? I've got a program > provided in the Java in a Nutshell examples book (~p. 177) that says it > prints on Windows platforms (even corrects some of the bad reporting > Windows does). It has methods that appear to handle/track the margins, > lines, pages, headers, etc. I haven't tried it yet, so I don't know if > it's a tease. This is pretty important - could you please tell me more? > > Thanks for the assistance. Even if it ends up being a no-go, the > information is very interesting. > > Ross Dukeshier -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<365051BC.23768C49@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<364D0510.5229@flash.net> <MPG.10b71d424d901fe8989711@forums.inprise.com> <364DB92E.5986@flash.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,41afd4a2b38a2664 X-Google-Attributes: gidf74b3,public From: Richard Wilkman <rwilkman@inprise.com> Subject: Re: Remembering PrintJob properties Date: 1998/11/16 Message-ID: <365051BC.23768C49@inprise.com> X-Deja-AN: 412431117 Content-Transfer-Encoding: 7bit References: <364D0510.5229@flash.net> <MPG.10b71d424d901fe8989711@forums.inprise.com> <364DB92E.5986@flash.net> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language