如何将图像像素坐标转换为PDF坐标

时间:2020-10-27 14:34:38

标签: javascript jquery pdf coordinates

使用 jQuery可拖动库在图像上设置坐标,并使用 pdf-lib库在pdf上设置坐标。

以下是在拖放过程中设置的一些坐标

Image (Width * Height)  => 825px * 1074px
After draggable item (Width * Height)  => 209px * 66px
Coordinate Poistion = (x,y) => 491px*519px
New PDF size = (width * height) = 609 x 791 pts

使用1px = 0.75pts将像素转换为点 并根据新的宽度和高度获取新的坐标 enter image description here

我不知道我的代码,因为签名点不在正确的位置。需要帮助

0 个答案:

没有答案