Class TextAnnotation
Defines a Sticky-Note style PDF annotation. Iron
Implements
Namespace: IronPdf.Annotations
Assembly: IronPdf.dll
Syntax
public class TextAnnotation : PdfClientAccessor, IAnnotation
Constructors
TextAnnotation(Int32)
Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations
Declaration
public TextAnnotation(int PageIndex)
Parameters
Type | Name | Description |
---|---|---|
System. |
PageIndex | Page index |
TextAnnotation(Int32, String, String)
Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations
Declaration
public TextAnnotation(int PageIndex, string Title, string Contents)
Parameters
Type | Name | Description |
---|---|---|
System. |
PageIndex | Page index |
System. |
Title | Annotation title |
System. |
Contents | Annotation contents |
TextAnnotation(String, String)
Define a new annotation with the specified parameters. Annotation must be added to the document via PdfDocument.Annotations
Declaration
public TextAnnotation(string Title, string Contents)
Parameters
Type | Name | Description |
---|---|---|
System. |
Title | Annotation title |
System. |
Contents | Annotation contents |
Properties
AnnotationIndex
Index of the annotation on a page. The first page has a annotation_index of 0
Declaration
public int AnnotationIndex { get; set; }
Property Value
Type | Description |
---|---|
System. |
Color
The color of the annotation's 'Sticky Note'
Note: Google Chrome PDF Viewer may not respect this color.
However, Adobe PDF Viewer and Foxit PDF Viewer display the color correctly.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Iron |
Contents
The contents of the 'sticky note' annotation
Declaration
public string Contents { get; set; }
Property Value
Type | Description |
---|---|
System. |
Height
Annotation visible height
Note: Google Chrome or Adobe PDF Viewer may not respect this height
.
However, Foxit PDF Viewer handles the height
correctly.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System. |
Hidden
Hides the annotation from users
Declaration
public bool Hidden { get; set; }
Property Value
Type | Description |
---|---|
System. |
Opacity
The opacity of the annotation (valid values are from 0.0 to 1.0)
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System. |
OpenByDefault
Sets the annotation to be opened and readable by default, without user interaction
Declaration
public bool OpenByDefault { get; set; }
Property Value
Type | Description |
---|---|
System. |
PageIndex
Index of the page to add the annotation. The first page has a page_index of 0
Declaration
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
System. |
Printable
Allows the annotation to be printed when users print the PDF
Declaration
public bool Printable { get; set; }
Property Value
Type | Description |
---|---|
System. |
ReadOnly
Allows the annotation to be printed when users print the PDF
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System. |
Rectangle
The position and size of annotation.
Note: Google Chrome or Adobe PDF Viewer may not respect the width
and height
.
However, Foxit PDF Viewer handles the position and size correctly.
Declaration
public Rectangle Rectangle { get; set; }
Property Value
Type | Description |
---|---|
Iron |
Rotatable
Allows the annotation to be rotated. E.g. when the containing page os rotated
Declaration
public bool Rotatable { get; set; }
Property Value
Type | Description |
---|---|
System. |
Subject
The sub title of the annotation as displayed in the header of the 'sticky note'
Declaration
public string Subject { get; set; }
Property Value
Type | Description |
---|---|
System. |
Title
The main title of the annotation as displayed in the header of the 'sticky note'
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System. |
Width
Annotation visible width
Note: Google Chrome or Adobe PDF Viewer may not respect this width
.
However, Foxit PDF Viewer handles the width
correctly.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System. |
X
The horizontal X position of the annotation on your page in pixels
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System. |
Y
The vertical Y position of the annotation on your page in pixels. Measured from bottom upwards.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
ToString()
Returns a System.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A System. |