Skip to content

# PDFVisualAnnotation

Namespace: O2S.Components.PDF4NET.View.Annotations

Defines an annotation displayed on a PDF page in the PDFDocumentView control.

    public class PDFVisualAnnotation

Inheritance Object → PDFVisualAnnotation

## Properties

### Annotation

Gets the underlying PDF annotation.

    public PDFAnnotation Annotation { get; }

Property Value

PDFAnnotation
A PDF annotation.

### DisplayRectangle

Gets or sets the visual rectangle of this annotation.

    public PDFDisplayRectangle DisplayRectangle { get; set; }

Property Value

PDFDisplayRectangle
A that represents the position and size of the annotation on the page.

Remarks

The visual rectangle is relative to the top left corner of the page.

### NormalAppearance

Gets or sets the annotation normal appearance.

    public PDFAnnotationAppearance NormalAppearance { get; set; }

Property Value

PDFAnnotationAppearance
A specifying how the annotation is presented visually on the page.

### Tag

Gets or sets an object that contains user-defined data associated with the annotation.

    public object Tag { get; set; }

Property Value

Object

Remarks

This property can be used to store any custom information relevant to the annotation at runtime. The value is not used by the annotation itself and is intended solely for application-specific data.
NOTE: The value of this property is not persisted in the PDF file.

### VisualPage

Gets the page that owns the anotation.

    public PDFVisualPage VisualPage { get; internal set; }

Property Value

PDFVisualPage
The PDFVisualPage that owns the annotation.

## Methods

### BeginUpdate()

Put the annotation in update mode.

    public void BeginUpdate()

Remarks

Any changes performed on the annotation are not updated in the PDFDocumentView control until PDFVisualAnnotation.EndUpdate() is called.
When multiple anotation properties need to be changed, the updates must be placed between PDFVisualAnnotation.BeginUpdate() and PDFVisualAnnotation.EndUpdate() calls.

### EndUpdate()

Notifies the PDFDocumentView control that the annotation has been updated and its new appearance should be displayed.

    public void EndUpdate()

Remarks

PDFVisualAnnotation.BeginUpdate() must be called first before calling this method.