Add Text Field Annotation
Contents
 [
      
        Hide
      ]
    How to add Text Field Annotation in C#
The Text field annotation adds rectangle with a text inside, like shown at the picture below.

There is an ability to specify the next properties for TextFieldAnnotation type:
- BackgroundColor - describes area background color;
 - Box - defines annotation position at document page;
 - Text - text that will be appear in rectangle
 - FontColor - color of the text
 - FontFamily - name of text font;
 - FontSize - size of text font;
 - Opacity - allows to set annotation opacity;
 - PenStyle - defines frame line style (solid, dash, dot etc.);
 - PenWidth - defines frame line width in pixels;
 - PenColor - defines frame color;
 - TextHorizontalAlignment - defines text horizontal alignment.
 
Follow these steps to add TextField annotation to document:
- Instantiate Annotator object with input document path or stream;
 - Instantiate TextFieldAnnotation object with desired properties (position, page number, etc);
 - Call Add method and pass TextFieldAnnotation object;
 - Call Save method with resultant document path or stream.
 
The following code demonstrates how to add TextFieldAnnotation to the document:
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Annotation for .NET examples, plugins, and showcase
 - GroupDocs.Annotation for Java examples, plugins, and showcase
 - Document Annotation for .NET MVC UI Example
 - Document Annotation for .NET App WebForms UI Modern Example
 - Document Annotation for Java App Dropwizard UI Modern Example
 - Document Annotation for Java Spring UI Example