Class TextAnnotation
Defines a Sticky-Note style PDF annotation. IronPdf.Engines.Pdfium.PdfiumInterop.UnmanagedDelegates.AddTextAnnotation
Inheritance
Implements
Namespace: IronPdf.Annotations
Assembly: IronPdf.dll
Syntax
public class TextAnnotation : Object, 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.Int32 | 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.Int32 | PageIndex | Page index |
System.String | Title | Annotation title |
System.String | 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.String | Title | Annotation title |
System.String | Contents | Annotation contents |
Properties
AnnotationIndex
Index of the annotaion on a page. The first page has a annotation_index of 0
Declaration
public int AnnotationIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Color
The color of the annotation's 'Sticky Note'
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
IronSoftware.Drawing.Color |
Contents
The contents of the 'sticky note' annotation
Declaration
public string Contents { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Height
Annotation visible height
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Hidden
Hides the annotation from users
Declaration
public bool Hidden { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Icon
An icon to visually represent the 'sticky note' annotation
Declaration
public TextAnnotation.AnnotationIcon Icon { get; set; }
Property Value
Type | Description |
---|---|
TextAnnotation.AnnotationIcon |
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.Double |
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.Boolean |
PageIndex
Index of the page to add the annotation. The first page has a page_index of 0
Declaration
public int PageIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Printable
Allows the annotation to be printed when users print the PDF
Declaration
public bool Printable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReadOnly
Allows the annotation to be printed when users print the PDF
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Rotateable
Allows the annotation to be rotated. E.g. when the containing page os rotated
Declaration
public bool Rotateable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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.String |
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.String |
Width
Annotation visible width
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
X
The horizontal X position of the annotation on your page in pixels
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
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.Int32 |
Methods
ToString()
Returns a System.String that represents this annotation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |