Programatically move PolyLineAnnot in dynaPDF

Hello All. I have a UI where the user can use a digital pen to mark up a pdf displayed as a background image on a canvas. The freehand pen drawing is then converted to a PolyLineAnnot using dynaPDF’s tools.

Let’s say this drawing is a signature that is not in the correct spot on the pdf image background. I am handling the UI already for dragging the ‘signature’ to the correct location. Once the dragging is completed, I need to relocate the original PolylineAnnot to the position that the user dragged it.

So, my question is, is there are way to reposition the annotation (it uses x.y points [vertices])? Or, does it need to be deleted and a new one created with the correct new x,y vertices?

Thanks for any help that you can provide.
Rocky

DynaPDFMBS.ChangeAnnotPos(Handle as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double) as boolean

Thanks, Marius. I had not seen this method. I will try it. I have my doubts whether it will work with the 3 annotation types that require a vertices array to be passed (line, polyline, polygon).

This is for sure help me with the non-vertices annotation types though. So, thanks again for the response.

Rocky

I wanted to report back about Marius’ suggested use of the DynaPDF method to change positions of an annotation.

I as thought the method works well for the annotation that use Left, Top, Width, and Height for positioning. (Thank you again, Marius!)

For the 3 annotation types that use a vertices array to define the positioning within a PDF, it does not work however. It does not fail. It just does not do anything.

So, at this point in order to reposition an annotation with vertices, I have to delete the current one and create a new one. This is not that difficult but is not ideal because it can cause the annotation count to increase greatly depending on how the user chooses and how often the user choose to reposition a given annotation.