PdfAnnotation class sealed

Base class for all PDF annotation types.

Use a switch expression on the concrete subtype to access type-specific fields:

switch (annotation) {
  PdfMarkupAnnotation(:final quadPoints, :final color) => ...,
  PdfLinkAnnotation(:final uri) => ...,
  _ => ...,
}

Common fields

Every annotation carries pageIndex, flags, and optionally rect, color, contents, author, and modifiedDate. Type-specific fields live only on the appropriate subclass.

Coordinate system

rect is in raw PDF page coordinates (bottom-left origin). Callers that need screen coordinates must apply FPDF_PageToDevice() themselves.

Implementers

Properties

author → String?
The annotation author (/T dictionary entry), or null if absent.
final
color → PdfColor?
The annotation colour, or null if no colour entry is present.
final
contents → String?
The annotation's Contents string, or null if absent.
final
flags → int
Raw FPDF_ANNOT_FLAG_* bitmask.
final
hashCode → int
The hash code for this object.
no setterinherited
modifiedDate → PdfDate?
The last-modified date (/M dictionary entry), or null if absent.
final
pageIndex → int
Zero-based index of the page this annotation belongs to.
final
Inlined popup annotation data, or null if this annotation has no popup.
final
rect → PdfRect?
The bounding rectangle in PDF page coordinates, or null if unavailable.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited