This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/knowledge-base/control-appearance-of-delete-button-on-ink-annotations.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Style PDF ink annotation delete button | Nutrient

To control the appearance of the delete button with CSS so that it only displays when an ink annotation is selected, first load a custom stylesheet to provide your custom CSS:

const instance = await NutrientViewer.load({
...configuration,
styleSheets: ["https://example.com/my-stylesheet.css"]
});

Then, add a display: none CSS rule to all delete buttons that aren’t the ink annotation one:

.PSPDFKit-Rectangle-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Ellipse-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Image-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Line-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Note-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Polygon-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Polyline-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Rectangle-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Stamp-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Text-Annotation-Toolbar-Button-Delete,
.PSPDFKit-Text-Markup-Annotation-Toolbar-Button-Delete {
display: none;
}