GroupDocs.Annotation v22.11 and later allows you to specify a user role for each user.
You can specify a User object for any reply. This object represents the author of the reply. You can also set a role of the user:
Viewer - GroupDocs.Annotation does not add their replies to the document.
Editor - GroupDocs.Annotation adds their replies.
Use this feature to control if a user can or cannot add comments to the document.
The following code snippet shows how to add a user role:
using(Annotatorannotator=newAnnotator("input.pdf-file")){AreaAnnotationarea=newAreaAnnotation{BackgroundColor=65535,Box=newRectangle(100,100,100,100),CreatedOn=DateTime.Now,Message="This is area annotation",Opacity=0.7,PageNumber=0,Replies=newList<Reply>{newReply{Comment="This comment will be applied",RepliedOn=DateTime.Now,User=newUser(1,"Reviewer",Role.Editor)},newReply{Comment="This comment will NOT be applied",RepliedOn=DateTime.Now,User=newUser(1,"Member",Role.Viewer)}}};annotator.Add(area);annotator.Save("result_export");}
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.