Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Convert mouse coordinates to pdf units

$
0
0

I've been googling for the past couple days on how to convert mouse coordinates to pdf units & this has proven to be very difficult...or at least I haven't been able to find it.  I have an X,Y pixel coordinate and I have to place stamp in a pdf document in that location.  I've found out that pdf units are different & start from the bottom.

 

I've tried;

point=pixel * 96 / 72.....also tried a few other options like pixel * 150/72 & pixel * 72 / 300.

 

While the last attempt produced my results for the X coordinate my Y is way off.  An example I have is;

x:1341

y:294

 

I can't believe I'm the first to encounter this so I'm hoping someone can help me out.

 

Steve.


Viewing all articles
Browse latest Browse all 3131

Trending Articles