Article View: borland.public.jbuilder.java.language
Article #17770Re: Bugs in PrintJob under Windows
From: odedb
Date: Wed, 30 Sep 1998 00:00
Date: Wed, 30 Sep 1998 00:00
48 lines
1888 bytes
1888 bytes
Hi,
The getpage dimension method does not work properly yet.
Instead there is a work around, by using the following instead:
private Dimension getPageSize()
{
int res = pj.getPageResolution();
Dimension pageSize = pj.getPageDimension();
res = parent.getToolkit().getScreenResolution();
return pageSize;
}
Where:
pj is the PrintJob Object.
parent is some frame.
Hope this helps you,
Oded Ben Zur
odedf@nexus.co.il
Nexus Telocation LTD
In article <35FB83C4.769F@she.de>,
hfrey@she.de wrote:
> Hi,
>
> whats wrong with the methods getPageDimension() and getPageResolution()
> from the class PrintJob under Windows? The methods doesn't return
> correct values. I've read in "JAVA in a Nutshell, Examples" that
> the methods doesn't work. There is a workaround with the methode
> getScreenResolution() from the class Toolkit. The result is very bad
> and different on different clients.
>
> Does anybody know whats on with the class PrintJob and how I can
> do printing correct?
>
> Thanks by
>
> Hans Georg Frey
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Technical Details
Message-ID:
<6ut55o$4ij$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35FB83C4.769F@she.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,78820e80254f39c8 X-Google-Attributes: gidf74b3,public From: odedb@nexus.co.il Subject: Re: Bugs in PrintJob under Windows Date: 1998/09/30 Message-ID: <6ut55o$4ij$1@nnrp1.dejanews.com> X-Deja-AN: 396292026 References: <35FB83C4.769F@she.de> X-Http-Proxy: 1.0 x5.dejanews.com:80 (Squid/1.1.22) for client 207.232.46.193 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Sep 30 11:37:26 1998 GMT Newsgroups: borland.public.jbuilder.java.language X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I)