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
The scripts in the annotation's /AA dictionary: the mouse and focus triggers of any annotation, and on a form widget the keystroke, format, validate and calculate triggers (§12.6.3, Table 194 and Table 196). Null when the annotation has no /AA.
/AP /N appearance Form XObject, or null.
Dash array from /BS /D, or the one /Border may carry as its fourth element.
Border style from /BS /S: S solid, D dashed, B beveled, I inset, U underline. Null when undeclared.
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.
The Invisible flag (§12.5.3, Table 165, bit 1): a viewer with no handler for a non-standard subtype hides the annotation instead of drawing its appearance.
/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.