XDoc.Word
Features
Tech Specs
How-to C#
Pricing

C# Word Library
C# Word - Annotate Word Page in C#.NET


Online Guide to Add Annotation to Word Page in C# Project





RasterEdge XDoc.Word Library provides some methods for developers to annotate on Word pages. In order to add various annotations, you need to add reference RasterEdge.Imaging.Annotation to your project.

Types of comment supported as follows:

  • Rectangle
  • Ellipse
  • Line
  • Freehand
  • Freehand Lines
  • Text
  • Rectangular Hot Spot
  • Freehand Hot Spot
  • Embedded Image
  • Referenced Image
  • polygon
  • Lines
  • Rubber Stamp
  • Callout
  • Arrow
  • Signature


Add Annotation to Word Page Using C#



This is a sample code for adding rubber stamp annotation to word page using C#.

DOCXDocument docx = new DOCXDocument(@"C:\1.docx");
BasePage page = docx.GetPage(0);
Font font = new Font("Arial", 15F);
AnnotationBrush brush = new AnnotationBrush();
AnnotationHandler annotation = AnnotationGenerator.CreateRubberStampAnnotation(10, 10, 100, 100, "Good", font, brush);
page.AddAnnotation(annotation);
docx.Save(@"C:\1anno.docx");