Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » calculate printer page size
calculate printer page size [message #179158] Mon, 25 April 2005 17:56
Eclipse UserFriend
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
Previous Topic:Custom selection frame
Next Topic:Intersects
Goto Forum:
  


Current Time: Fri Apr 26 22:09:15 GMT 2024

Powered by FUDForum. Page generated in 0.03122 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top