This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/user-interface/annotation-toolbar/remove-a-tool.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Remove annotation tool in JavaScript PDF viewer | Nutrient

Nutrient Web SDK comes with a customizable annotation toolbar that, by default, includes a number of predefined items. You can remove any toolbar item you want using our API.

In the example below, we’re removing the blend-mode item from the ink annotation toolbar when loading the PDF:

NutrientViewer.load({
// ...otherOptions
annotationToolbarItems: (
annotation,
{ defaultAnnotationToolbarItems }
) => {
if (annotation instanceof NutrientViewer.Annotations.InkAnnotation) {
// Remove the default annotation toolbar item.
return defaultAnnotationToolbarItems.filter(
(item) => item.type !== "blend-mode"
);
}
return defaultAnnotationToolbarItems;
}
});

We can also change the annotation toolbar once the PDF has loaded using instance.setAnnotationToolbarItems:

instance.setAnnotationToolbarItems(
(annotation, { defaultAnnotationToolbarItems }) => {
if (annotation instanceof NutrientViewer.Annotations.InkAnnotation) {
// Remove the default annotation toolbar item.
return defaultAnnotationToolbarItems.filter(
(item) => item.type !== "blend-mode"
);
}
return defaultAnnotationToolbarItems;
}
);