Skip to content
ComPDF
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Delete Annotations

Delete single/multiple annotations using the deleteAnnotations method. Acceptable parameters:

  • Single annotation object;
  • A one-dimensional array composed of multiple annotation objects;
javascript
const annotationManager = docViewer.getAnnotationManager()
const annotationsList = annotationManager.getAnnotationsList()
annotationManager.deleteAnnotation(annotationsList[0])
annotationManager.deleteAnnotations(annotationsList)