calculate printer page size [message #179158] |
Mon, 25 April 2005 13:56 |
Eclipse User |
|
|
|
Originally posted by: christian.sell.netcologne.de
Hello,
I am trying to calculate the size of a printer page relative to the size
of a diagram displayed in a graphical editor. The purpose is to show an
outline (in a layer) of the page as it will appear on the printer.
I have tried different approaches - for example calling
printer.getClientArea()
and scaling it according to
printer.getDPI() / Display.getCurrent().getDPI();
but the result does not look satisfying, i.e. the calculated page turns
out smaller than the real printed one.
Can someone tell me the canonical way to calculate the number of GEF
pixels that corresponds to a given number of printer pixels?
thanks,
christian
|
|
|
Powered by
FUDForum. Page generated in 0.03278 seconds