Q: I have placed TextField widget annotation in 4 different location
Javscript (Acrobat): x1:2.7, y1:26, x2:28, y2:1
ServerSide (PDFNet SDK) : x1:1223.59, x2:1249.59, y1:1.08501,
Javscript: x1:1.8, y1:790, x2:28, y2:765
ServerSide: x1:1222, x2:1248, y1:765, y2:790
Javscript: x1:2.7, y1:792, x2:327, y2:766
ServerSide: x1:1522, x2:1548, y1:766, y2:792
Javscript: x1:587, y1:791, x2:613, y2:765
ServerSide: x1:1808, x2:1834, y1:765, y2:791
Question: Why server side X1,X2 coordinates are different than client?
If you notice Client and Server Y1 and Y2 coordinates are almost same
but not X1 and X2. Image placed at runtime using server side
coordinates (GetRect() return values) is not appearing whereas working
fine with client side coordinates (in our case client side is not
Is there a formula or function to get client side coordinates at
A: What is the value of page.GetRotation() and page.GetCropBox()?
In order to obtain the coordinates in the page coordinate system
(rotated and cropped) you may need to take into account these
paramaters. One way of doing this is using page.GetDeafautMatrix().
Matrix2D mtx = page.GetDeafautMatrix();
Rect annot_rect = annotation.GetRect();