Skip to main content
Known Participant
January 16, 2017
Question

How to delete a Highlight annotation?

  • January 16, 2017
  • 1 reply
  • 766 views

Hello,

I have created a plugin to create a highlight annotation using COS object.

Now, I want to delete that annotation by comparing the contents in it.

How can I achieve this?

I am using:

SDK : Acrobat Pro SDK(Version1)

Product: Acrobat Pro DC(Version2015)

Platform: Windows 7

Thanks,

Best Regards,

Navnath

This topic has been closed for replies.

1 reply

Legend
January 16, 2017

Using Cos I would enumerate the annotations on each target page IN REVERSE ORDER of annotation index. Start with the Annots key in the page dictionary (optional). Compare the annotation type and other keys to find a match. Delete from the Annots array.

Legend
January 16, 2017

I think it may be mandatory to send a notification, can't recall.

Known Participant
January 16, 2017

Thank you for the reply.

I got the solution

We can use PDPageRemoveAnnot as below:

PDPageRemoveAnnot(page, PDPageGetAnnotIndex(page, annot));

Thanks.