[PrintPreview] Get page border coordinates in pixel

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

[PrintPreview] Get page border coordinates in pixel

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.

mij
Member

Posts: 2
Joined: October 24th, 2007, 9:50 am

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.
Kambiz

Kambiz

Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Thanks, this is what I need !
mij
Member

Posts: 2
Joined: October 24th, 2007, 9:50 am