Table of Contents

Class PdfAnnotation

Namespace
PdfSharp.Pdf.Annotations
Assembly
PdfSharp.dll

Represents the base class of all annotations.

public abstract class PdfAnnotation : PdfDictionary, ICloneable, IEnumerable<KeyValuePair<string, PdfItem?>>, IEnumerable
Inheritance
PdfAnnotation
Implements
Derived
Inherited Members

Constructors

PdfAnnotation()

Initializes a new instance of the PdfAnnotation class.

protected PdfAnnotation()

PdfAnnotation(PdfDocument)

Initializes a new instance of the PdfAnnotation class.

protected PdfAnnotation(PdfDocument document)

Parameters

document PdfDocument

Properties

Color

Gets or sets the color representing the components of the annotation. If the color has an alpha value other than 1, it is ignored. Use property Opacity to get or set the opacity of an annotation.

public XColor Color { get; set; }

Property Value

XColor

Contents

Gets or sets the text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form.

public string Contents { get; set; }

Property Value

string

Flags

Gets or sets the annotation flags of this instance.

public PdfAnnotationFlags Flags { get; set; }

Property Value

PdfAnnotationFlags

Opacity

Gets or sets the constant opacity value to be used in painting the annotation. This value applies to all visible elements of the annotation in its closed state (including its background and border) but not to the popup window that appears when the annotation is opened.

public double Opacity { get; set; }

Property Value

double

Parent

Gets or sets the PdfAnnotations object that this annotation belongs to.

public PdfAnnotations Parent { get; set; }

Property Value

PdfAnnotations

Rectangle

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

public PdfRectangle Rectangle { get; set; }

Property Value

PdfRectangle

Subject

Gets or sets text representing a short description of the subject being addressed by the annotation.

public string Subject { get; set; }

Property Value

string

Title

Gets or sets the text label to be displayed in the title bar of the annotation’s pop-up window when open and active. By convention, this entry identifies the user who added the annotation.

public string Title { get; set; }

Property Value

string

Methods

Delete()

Removes an annotation from the document Remove(PdfAnnotation)

[Obsolete("Use 'Parent.Remove(this)'")]
public void Delete()