usmanazizgroupdocs
4/17/2017 - 9:35 AM

Documents-RemoveAnnotation.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As PdfDocument = Document.Load(Of PdfDocument)(Utilities.MapSourceFilePath(FilePath))
    ' Remove Annotation by index
    doc.Pages(0).Annotations.RemoveAt(0)

    ' Remove Annotation by reference
    doc.Pages(0).Annotations.Remove(doc.Pages(0).Annotations(0))

    doc.Save()
End Using