' For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
' initialize Pdfformat
Dim pdfFormat As New PdfFormat(Common.MapSourceFilePath(filePath))
' inspect document
Dim inspectionResult As PdfInspectionResult = pdfFormat.InspectDocument()
' get annotations
Dim annotation As PdfAnnotation() = inspectionResult.Annotations
' if annotations are presented
If annotation.Length > 0 Then
' remove all annotation
pdfFormat.RemoveHiddenData(New PdfInspectionOptions(PdfInspectorOptionsEnum.Annotations))
'save output file...
pdfFormat.Save(Common.MapDestinationFilePath(filePath))