Make form fields movable just like other annotations

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
8.7.0

Detailed description of issue
When a form field is added programmatically it is not getting selected by default just like other annotations for ex. Free Text have the bounds to rotate,move and enlarge etc.

Expected behaviour
Need to have a similar bound like this but around the newly added text field programmatically.
image

Does your issue happen with every document, or just one?
Its not working with all documents having form fields added programmatically.

Link to document
{Provide a link to the document in question if possible}

Code snippet
const flags = new WidgetFlags(); flags.set('Multiline', false); flags.set('Required', true); // create a form field const field = new Annotations.Forms.Field('coachName', { type: 'Tx', flags, }); field.setValue('Coach name'); // create a widget annotation const widgetAnnot = new Annotations.TextWidgetAnnotation(field); // set position and size widgetAnnot.PageNumber = currentPageNumber; widgetAnnot.X = pageCoordinates.x; widgetAnnot.Y = pageCoordinates.y; widgetAnnot.Width = 100; widgetAnnot.Height = 20; // add the form field and widget annotation annotManager.getFieldManager().addField(field); annotManager.addAnnotation(widgetAnnot); annotManager.drawAnnotationsFromList([widgetAnnot]);

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here

Hi Anurag,

Unfortunately, form fields are not moveable annotations. I would recommend using a fixed size FreeText annotation.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.


Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here