PdfAnnotation
One PDF annotation (ISO 32000-1 §12.5).
The subtype discriminates between the 20+ annotation types defined in the spec. First-class support is provided for:
Subtype.Link: URL or named-destination hyperlinks
Subtype.Highlight: text highlight (yellow overlay)
Subtype.Underline: underline marker
Subtype.StrikeOut: strikethrough marker
Subtype.Text: sticky-note popup
Other subtypes are parsed into Subtype.Other and exposed in raw so callers can pattern-match. The rectangle and contents are always there.
For rendering, appearanceStream (the /AP /N stream when present) is the canonical way to draw the annotation. It is a Form XObject the spec mandates "shall be used as the visual representation." We expose it as a raw stream so PageRenderer can recursively render it.
Constructors
Types
Properties
/AP /N appearance Form XObject, or null.
Declared border width in points, from /BS /W or the third element of /Border, or null when the annotation declares neither and the §12.5.4 default of 1 applies.
/IC interior (fill) colour for Square/Circle/Line/Polygon.
/QuadPoints (8 numbers per quad) for text-markup annotations.
The raw dict, for callers that need fields we didn't extract.
Raw /Dest value on link annotations. Pass through PdfDocument.resolveDestination.