Click or drag to resize

PdfDocumentAddTextAnnotation Method (String, String, String, Int32, Int32, Int32, Int32, Int32, PdfDocumentTextAnnotationAnnotationIcon, Boolean, Boolean, Boolean, String, Double)

Adds an annotation to a page of this PdfDocument

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 5.1.1.20965 (5.1.1.2)
Syntax
public void AddTextAnnotation(
	string Title,
	string Subject,
	string Contents,
	int PageIndex,
	int X,
	int Y,
	int Width = 30,
	int Height = 30,
	PdfDocumentTextAnnotationAnnotationIcon Icon = PdfDocumentTextAnnotationAnnotationIcon.Comment,
	bool Open = true,
	bool ReadOnly = true,
	bool Printable = false,
	string RgbColor = "#FFFF33",
	double Opacity = 1
)

Parameters

Title
Type: SystemString
The title of the annotation
Subject
Type: SystemString
The subject or 'subheading' of the annotation
Contents
Type: SystemString
The text content of the annotation
PageIndex
Type: SystemInt32
Index of the page to add the annotation. The first page has a PageIndex of 0
X
Type: SystemInt32
The horizontal X position of the annotation on your page in pixels
Y
Type: SystemInt32
The vertical Y position of the annotation on your page in pixels. Measured from top downwards.
Width (Optional)
Type: SystemInt32
The width of your annotation's icon and interactive area in pixels
Height (Optional)
Type: SystemInt32
The height of your annotation's icon and interactive area in pixels
Icon (Optional)
Type: IronPdfPdfDocumentTextAnnotationAnnotationIcon
The icon used to display the interactive annotation within the PDF
Open (Optional)
Type: SystemBoolean
Sets the annotation to be opened and readable by default, without user interaction
ReadOnly (Optional)
Type: SystemBoolean
Makes the annotation non user editable
Printable (Optional)
Type: SystemBoolean
Makes the annotation render during user PDF printing operations
RgbColor (Optional)
Type: SystemString
Color of the annotation's background 'sticky note' using Html color notation. E.g. '#FFFF33'.
Opacity (Optional)
Type: SystemDouble
The opacity of the annotation (valid values are from 0.0 to 1.0)
See Also