Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Page markers (Read 3052 times)
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Page markers
Mar 27th, 2008 at 11:08am
Print Post  
Hi

I am using page markers to show the users where the pages end. The users are able to select which page size that should be indicated by the page markers. The users are also able to set the size of the document area. My problem is that when using the page markers for paper size A4 (210*297 mm), the distance between page markers are 224 mm instead of 210 mm when measured on the screen.

Is this correct? My idea is that if the users sets the width of the document to 420 mm, exactly to pages should be indicated by the page markers.


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Page markers
Reply #1 - Mar 27th, 2008 at 1:16pm
Print Post  
Hi,

What values are you setting for the PageMarkersFixedWidth and Height properties, and in what units?

Stoyan
  
Back to top
 
IP Logged
 
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Re: Page markers
Reply #2 - Mar 27th, 2008 at 2:07pm
Print Post  
Hi Stoyan

The function I want for my application is that the width of the document, that is set by the user, corresponds to what is indicated by the page markers. Currently the user sets the desired width of the document in centimeters. From this I calculate the width in pixels using a function called "HIMETRICtoDP". If everything works the way I want, setting the width to e.g. 42 centimeters and the PrintOptions.PaperSize to pszA4 should give me page markers indicating two A4 pages in width. Currently this is not the case!

Maybe my approach is wrong or the "HIMETRICtoDP"-function is not feasible.
Any comments or ideas?


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Page markers
Reply #3 - Mar 27th, 2008 at 6:53pm
Print Post  
Hi Magnus,

So, you are not setting the FixedWidth and Height property values for the page markers, but letting FlowchartX query the printer for the paper size. What the markers correspond to in this case is the printable area supported by the printer for the selected paper size, which is smaller than the actual page. Since FlowChartX calculates that size when you enable the ShowPageMarkers property, we can add new members to the API that will let you find the calculated size. Otherwise, you would have to use GetDeviceCaps with the following arguments to calculate it yourself

PHYSICALWIDTH
PHYSICALHEIGHT
PHYSICALOFFSETX
PHYSICALOFFSETY
LOGPIXELSX
LOGPIXELSY

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
MagnusSpeychal
Junior Member
**
Offline



Posts: 53
Joined: Jun 18th, 2007
Re: Page markers
Reply #4 - Mar 31st, 2008 at 9:06am
Print Post  
Hi Stoyan

OK! Now I am starting to understand how this works. I did not realize that FlowChart queried the printer for the paper size. This is actaully quite neat and I think I will stick with this behavior.


Best regards,
Magnus
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint