Redrawing annotation not moving visual


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

Code snippet
const all_widgets = annotManager.getAnnotationsList();

            all_widgets.forEach(widget => {
                var widget_id = widget.Id;
                if (widget_id == current_selected_annotation.Id) {
                    widget.X = parseInt($("#x").val());

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!