Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created October 14, 2019 13:22
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/62832e174c19fefe450556afe560a054 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/62832e174c19fefe450556afe560a054 to your computer and use it in GitHub Desktop.
// Create list of annotations
List<AnnotationBase> annotations = new List<AnnotationBase>()
{
new AreaAnnotation()
{
PageNumber = 0,
Box = new Rectangle(100, 100, 100, 100),
Message = "area"
},
new EllipseAnnotation()
{
PageNumber = 0,
Box = new Rectangle(200, 200, 80, 80),
Message = "ellipse"
}
};
// Create annotator
using (Annotator annotator = new Annotator("input.pdf"))
{
// Add annotations
annotator.Add(annotations);
// Save result to "result.pdf"
annotator.Save("result.pdf", new SaveOptions());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment