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.
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]);