Skip to content

Instantly share code, notes, and snippets.

@andruhovski
Created October 13, 2020 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andruhovski/63142b59d6c287d72b5f0b438cbbcec9 to your computer and use it in GitHub Desktop.
Save andruhovski/63142b59d6c287d72b5f0b438cbbcec9 to your computer and use it in GitHub Desktop.
Removing annotations from PDF page
private static void RemoveAnnotations(Page page, Aspose.Pdf.Annotations.AnnotationType annotationType)
{
var annotations = page.Annotations.Where(a => a.AnnotationType == annotationType).ToArray();
foreach (var annotation in annotations)
{
page.Annotations.Delete(annotation);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment