Hi,
Two steps are needed to move the rectangle tool button to the main header.
- set the value of buttonGroup to null for the rectangle tool using instance.updateTool. Doing this will remove the rectangle tool in the group.
instance.updateTool('AnnotationCreateRectangle', { buttonGroup: null });
- use instance.setHeaderItems to create a rectangle toolbutton to the header.
related guide: https://pdfjs.express/documentation/ui-customization/customizing-header
Best Regards,
Zhijie