Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created August 6, 2019 19:13
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 GroupDocsGists/fcb0736c7f0e3cef3d8d03ed4a0844de to your computer and use it in GitHub Desktop.
Save GroupDocsGists/fcb0736c7f0e3cef3d8d03ed4a0844de to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET
// Get input file stream
Stream inputFile = new FileStream("E:\sample.pdf", FileMode.Open, FileAccess.ReadWrite);
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();
// Initialize ellipse annotation.
AnnotationInfo ellipse = new AnnotationInfo
{
Box = new Rectangle(100, 100, 50, 50),
Type = AnnotationType.Ellipse;
};
// Add annotation to list
annotations.Add(ellipse);
// Export annotation and save output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment