# How to delete highlight annotation from pdf with pdf js express in react

**URL:** <https://pdfjs.community/t/how-to-delete-highlight-annotation-from-pdf-with-pdf-js-express-in-react/379>\
**Category:** Technical Support\
**Created:** [November 3, 2020, 2:32am UTC](https://pdfjs.community/t/how-to-delete-highlight-annotation-from-pdf-with-pdf-js-express-in-react/379 "2020-11-03T02:32:59Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ehtesham.ahmad.nadim](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/ehtesham.ahmad.nadim/32/425_2.png) [@ehtesham.ahmad.nadim](https://pdfjs.community/u/ehtesham.ahmad.nadim)\
**Post date:** [November 3, 2020, 2:32am UTC](https://pdfjs.community/t/how-to-delete-highlight-annotation-from-pdf-with-pdf-js-express-in-react/379/1 "2020-11-03T02:32:59Z")

</div>

I am using pdf js express to draw highlight annotation in pdf. But when I couldn’t delete the annotation from the pdf. I am using this code to create highlight:

```
  const { Annotations, annotManager } = instance;
  citations.forEach((citation) => {
    if (citation.quads && isNumber(citation.page) && !isNaN(parseInt(citation.id))) {
      const citationAuthor = citation.created_by && citation.created_by.user
        ? `${citation.created_by.user.first_name} ${citation.created_by.user.last_name}`.trim()
        : author;
  
      const highlight = new Annotations.TextHighlightAnnotation();
      highlight.Author = citationAuthor;
      highlight.Quads = citation.quads;
      highlight.PageNumber = citation.page;
      highlight.Id = citation.id.toString();
      highlight.Locked = true;
      highlight.Subject = 'Citation';
      annotManager.addAnnotation(highlight, true);
      annotManager.drawAnnotations(highlight.PageNumber);
    }
  });

```

I am not finding any way to delete highlight annotation which will basically remove the highlight from the pdf. I tried deleteAnnotation but it is not deleting the highlight from the pdf.

---

_[View the full topic](https://pdfjs.community/t/how-to-delete-highlight-annotation-from-pdf-with-pdf-js-express-in-react/379)._
