Posted 7 February 2023, 9:49 am EST
There seems to be a bug with execPasteAction and it doesn’t respect the pageIndex passed to it. We’re trying to place the pasted annotation at specific coordinates on a specific page. It seems like there’s a version of execPasteAction that allows x, y, and pageIndex parameters but pageIndex doesn’t seem to work and pasted items always appear on the first page. Could you provide an example of using execPasteAction in this way?
Also, what’s the best way to convert page coordinates (from mouse position for example) to pdf coordinates? We have a method that calculates the position using the viewPort and pagebounds but I’m wondering if there’s a more straightforward way.
Thanks