I am trying to insert a stamp into a PDF document.
I’m using a simple package that makes the insertion very easy, I have a problem tough.
This stamp needs to be inserted in a blank space in the document, to find such a space I use the find image activity, with a white image as a target.
Doing this I can find a spot in which to put the stamp, so I retrieve the x and y coordinates of the uielement corresponding to the position of the image found and it should put the stamp at that position.
Unfortunately, the x and y coordinates of the uielement are relative to the entire screen of the pc, but the insertion of the stamp uses coordinates relative to the pdf… the (0,0) point is the top left corner of the PDF document when you insert the stamp, but the x,y coordinates found with find image considers (0,0) to be the top left corner of the entire screen , because of this the stamp is not pasted in the exact place found by find image, it gets offset.
Now i can’t find a way to convert those screen coordinates to pdf coordinates in a reasonable way so that the stamp gets pasted in the right spot… what can i do?