当用户绘制注释时我正在捕捉X和Y坐标 X坐标= 121.25 Y坐标= 325.90 导出pdf时我必须以tiff文件的原始大小进行操作,用户上传的内容如 页面高度= 1210 页面宽度= 1650 我想知道在哪里绘制注释用户绘制。虽然导出PDF注释是用旧的X和Y坐标绘制的,所以它指向其他一些地方 请有人建议计算X和Y的公式新的高度和宽度。I'm generating a Export PDF using DebenuPDF library, my question is not related to Debenu.In my web page I will render tiff file with static height and width. In the Tiff file user can add the annotation. Height and width example as shown belowPage Height = 600Page Width = 400While the user plotting the annotation I was capturing the X and Y co-ordinatesX co-ordinate = 121.25Y co-ordinate = 325.90While exporting the pdf I have to do it in original size of tiff file what the user uploaded such asPage Height = 1210Page Width = 1650I want to know plot the annotation where the user plotted. While exporting the PDF annotations are plotted with old X and Y co-ordinates so its pointing to some other placesPlease anybody suggest the formula to calculate the X and Y co-ordinates with new height and width.推荐答案不确定我读得那么好,但是: 如果您的格式从600x400缩放到1210x1650,那么您的X缩放比例为1210/600 = 2,0167,Y缩放比例为1650/400 = 4,125。在您的示例中,假设是线性的,新的x和y坐标将是X = 1210/600 * 121,25 = 244并且Y = 1650/400 * 325,9 = 1340Not sure I read that well, but:If your format is scaled from 600x400 to 1210x1650, then you have a X scaling of 1210/600=2,0167 and a Y scaling of 1650/400=4,125. In your example, and assuming linear, the new x and y coordinate would be X=1210/600*121,25=244 and Y=1650/400*325,9=1340 这篇关于用新的高度和宽度绘制PDF x和y坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 17:14