PdfFreeTextAnnotation Class

A free text annotation (ISO 32000-2, 12.5.6.6): a text drawn directly on the page, in a box, possibly with a callout line.

public sealed class PdfFreeTextAnnotation : PdfMarkupAnnotation
Inheritance
PdfMarkupAnnotation PdfFreeTextAnnotation

Properties

NameDescription
AlignmentGets or sets the alignment of the text (/Q): PdfTextAlignment.Left, PdfTextAlignment.Center or PdfTextAlignment.Right.
CalloutLineGets or sets the points of the callout line (/CL): two or three points, from the point the callout designates to the box; an empty list when the annotation has none.
CalloutLineEndingGets or sets the ending of the callout line at the point it designates (/LE).
DefaultAppearanceGets or sets the default appearance string of the text (/DA, 12.7.4.3): the operators that set its font, size and color, such as /Helvetica 12 Tf 0 g.
IntentGets or sets the intent of the annotation (/IT): FreeText, FreeTextCallout or FreeTextTypeWriter.

Gets or sets the alignment of the text (/Q): PdfTextAlignment.Left, PdfTextAlignment.Center or PdfTextAlignment.Right.

public PdfTextAlignment Alignment { get; set; }

Property value

PdfTextAlignment

Exceptions

ArgumentOutOfRangeException
The value is PdfTextAlignment.Justify, which a free text cannot have.

Gets or sets the points of the callout line (/CL): two or three points, from the point the callout designates to the box; an empty list when the annotation has none.

public IReadOnlyList<PdfPoint> CalloutLine { get; set; }

Property value

IReadOnlyList<PdfPoint>

Exceptions

ArgumentException
The list does not have 0, 2 or 3 points.

CalloutLineEnding

PdfFreeTextAnnotation.cs

Gets or sets the ending of the callout line at the point it designates (/LE).

public PdfLineEnding CalloutLineEnding { get; set; }

Property value

PdfLineEnding

DefaultAppearance

PdfFreeTextAnnotation.cs

Gets or sets the default appearance string of the text (/DA, 12.7.4.3): the operators that set its font, size and color, such as /Helvetica 12 Tf 0 g.

public string? DefaultAppearance { get; set; }

Property value

string?

Gets or sets the intent of the annotation (/IT): FreeText, FreeTextCallout or FreeTextTypeWriter.

public string? Intent { get; set; }

Property value

string?