Redrawing annotation not moving visual

Hello,

I am trying to manually edit the annotation X and Y values outside of PDF express to give more specific control over where they are. When I change the X or Y value it moves the box to select the annotation but the annotation visual does not get redrawn to match the box.


PDF.js Express Version
“7.2.0”

Code snippet
const all_widgets = annotManager.getAnnotationsList();

            all_widgets.forEach(widget => {
                var widget_id = widget.Id;
                console.log(widget_id);
                if (widget_id == current_selected_annotation.Id) {
                    console.log("Selected");
                    console.log(widget.X);
                    widget.X = parseInt($("#x").val());
                    annotManager.redrawAnnotation(widget);
                }
            });

Hey there!

This is a limitation with PDF.js (our core rendering engine). The actual green part of the button is a bitmap baked into the document and cannot be moved the way you intend.

In order to extract that annotation for editing, you need to extract it using our REST API and then reimport it.

We have a guide on this process here.

Let me know if you have any more questions!

Thanks,
Logan