Page 1 of 1

[PrintPreview] Get page border coordinates in pixel

PostPosted: October 24th, 2007, 9:55 am
by mij
Hello,

I need to show some components over the TPrintPreview. And for this I'm trying to find the exact position of the page top left and right corners (see the red arrows on my image). But I just can't find any property to help me with this.

Do I need to calculate the distance of the grey background ? Thanks for the help.


PostPosted: October 25th, 2007, 2:52 am
by Kambiz
Use PaperToClient method.

For example, PaperToClient(Point(0, 0)).X is the value of what you have marked in the image by the question mark.

PostPosted: October 25th, 2007, 7:36 am
by mij
Thanks, this is what I need !