Created
October 14, 2019 13:22
-
-
Save GroupDocsGists/62832e174c19fefe450556afe560a054 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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