How to move rubber stamp out of mis tool and remove another group annotation

PDF.js Express Version

Detailed description of issue
{I want to move the rubber stamp group out of the mis tools, and place it on the header to eliminate action click from user,


}

Expected behaviour
{when i use header.delete(indexNo) base on the console index, look like the order is not corrected. For example when i use header.delete(13), it will delete signature group, but the index(13) show in the console is shapeTools

}

Does your issue happen with every document, or just one?
{Yes}

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

Code snippet
{header.delete(13)}

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:

Hey there!

This code moves the rubber stamp into the main header:

  // remove old toold
  instance.updateTool('AnnotationCreateRubberStamp', { buttonGroup: '' });

  // add new tool
  instance.setHeaderItems(header => {
    const items = header.getItems()
    header.get('freeHandToolGroupButton').insertBefore({
      type: 'toolButton',
      toolName: 'AnnotationCreateRubberStamp'
    })
    header.update(items);
  })

Thanks,
Logan

Thank you, i will try

1 Like