PdfAnnotation Class

An annotation of a page (ISO 32000-2, 12.5): a link, a note, a form field widget, ...

public class PdfAnnotation

Remarks

The class cannot be derived outside the library: PdfLinkAnnotation represents the links, PdfFileAttachmentAnnotation the file attachments, PdfMarkupAnnotation the other markup annotations (notes, text markups, stamps...).

Properties

NameDescription
ColorGets or sets the color of the annotation (/C, 12.5.2): the background of its icon, the title bar of its pop-up window, the border of a link, the color of a text markup; null when it is transparent or has none. Changing it does not change an appearance stream the annotation already has.
ContentsGets or sets the text of the annotation, or an alternate description of its content.
DictionaryGets the annotation dictionary.
FlagsGets or sets the flags of the annotation (/F, 12.5.3): whether it is printed, hidden, locked... The bits the enumeration does not name are kept.
PageGets the page of the annotation.
RectangleGets or sets the location of the annotation on the page, in default user space.
ReferenceGets the reference to the annotation, or null for a direct object (which the specification does not allow, but some files have).
SubtypeGets the type of the annotation, such as Link, Text or Widget.

Gets or sets the color of the annotation (/C, 12.5.2): the background of its icon, the title bar of its pop-up window, the border of a link, the color of a text markup; null when it is transparent or has none. Changing it does not change an appearance stream the annotation already has.

public PdfColor? Color { get; set; }

Property value

PdfColor?

Gets or sets the text of the annotation, or an alternate description of its content.

public string? Contents { get; set; }

Property value

string?

Gets the annotation dictionary.

public PdfDictionary Dictionary { get; }

Property value

PdfDictionary

Gets or sets the flags of the annotation (/F, 12.5.3): whether it is printed, hidden, locked... The bits the enumeration does not name are kept.

public PdfAnnotationFlags Flags { get; set; }

Property value

PdfAnnotationFlags

Gets the page of the annotation.

public PdfPage Page { get; }

Property value

PdfPage

Gets or sets the location of the annotation on the page, in default user space.

public PdfRectangle Rectangle { get; set; }

Property value

PdfRectangle

Gets the reference to the annotation, or null for a direct object (which the specification does not allow, but some files have).

public PdfReference? Reference { get; }

Property value

PdfReference?

Gets the type of the annotation, such as Link, Text or Widget.

public string Subtype { get; }

Property value

string