Instantiate the annotation object of the appropriate type. Available annotation types are listed here.
Assign the User class to Reply.User property (by default it is “Guest”).
Assign the Reply class(es) to the Replies collection created at previous steps.
Call the Add method of the Annotator class. Specify the annotation.
Call the Save method. Specify the output document path or stream.
The following code snippet shows how to add replies to annotation:
using(Annotatorannotator=newAnnotator("input.pdf")){Useruser1=newUser{Id=1,Name="Tom",Email="somemail@mail.com"};Useruser2=newUser{Id=2,Name="Jack",Email="somebody@mail.com"};AreaAnnotationarea=newAreaAnnotation{Box=newRectangle(100,100,100,100),CreatedOn=DateTime.Now,Message="This is an area annotation",PageNumber=0,Replies=newList<Reply>{newReply{Id=1,Comment="First comment",RepliedOn=DateTime.Now,User=user1},newReply{Id=2,Comment="Second comment",RepliedOn=DateTime.Now,User=user2,}}};annotator.Add(area);annotator.Save("result.pdf");}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.