Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Get Page Size (Read 2159 times)
asloan
YaBB Newbies
*
Offline



Posts: 35
Joined: Mar 6th, 2006
Get Page Size
Jan 18th, 2007 at 4:17pm
Print Post  
Is there a way to get the page height of a diagram.

When FCX displays its page markers, it queries either the default printer or the "PreferredDevice" to determine how to break the document up visually into sections.

Since we print on large format printers, these diagrams need to print on one page(34x100), and still be legible.  Many times there are branches which are border aligned that exceed the page height.  What I need to do is calculate the height of the branch and how much it exceedes the page height and split it up into smaller branches that are laid out centrally.

Thanks,
Alan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Get Page Size
Reply #1 - Jan 18th, 2007 at 5:43pm
Print Post  
It seems the control keeps the page width and height in internal fields, so we can expose them as properties in the next release. Or you could calculate them yourself using this formula:

pageWidth = (long)(physicalWidth / (printerDPI / screenDPI));
pageHeight = (long)(physicalHeight / (printerDPI / screenDPI));

That will let you know the page width in screen pixels. Use the GetDeviceCaps Windows function on the printer HDC and the screen HDC to find out the physicalWidth/Height and DPI values.

Stoyan
  
Back to top
 
IP Logged
 
asloan
YaBB Newbies
*
Offline



Posts: 35
Joined: Mar 6th, 2006
Re: Get Page Size
Reply #2 - Jan 18th, 2007 at 6:57pm
Print Post  
Thanks!  That worked.

Alan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint