An annotation: an object on a page, such as a note, a link or a form field's widget. A live view over the annotation dictionary.
public abstract class PdfAnnotation
ISO 32000-2 §12.5. Annotations lists a page's annotations; each is an instance of the class its
Subtype selects (Table 171), and any other subtype, or none, is a PdfUnknownAnnotation. Markup annotations
(§12.5.6.2) derive from PdfMarkupAnnotation.
Every property reads the dictionary when called and returns the default the specification gives when an entry is absent, without writing it. A malformed entry reads as its default and records a diagnostic the first time it is read (lenient mode); in strict mode the property throws. Values such as Rect, Border and Color are snapshots computed per call.
The same annotation dictionary always gives the same instance, whether it is reached from the page or from another annotation (Popup, InReplyTo, Parent).
kind:method, kind:property, kind:ctor. Press Esc to clear.AppearanceDictionaryGets the appearance dictionary (AP, PDF 1.2), or null when the annotation has none.AppearanceStateGets the appearance state (AS, PDF 1.2) that selects an appearance from a state subdictionary, or null.AssociatedFilesGets the files associated with the annotation (AF, PDF 2.0); empty when there are none.BlendModeGets the blend mode used when painting the annotation onto the page (BM, PDF 2.0); default Normal.BorderGets the border: from BS when present, else from Border, else solid and 1 point wide.ColorGets or sets the annotation's colour (C, PDF 1.1): its icon background, pop-up title bar or link border; null when absent, and setting null removes it. Setting it keeps the appearance: call RegenerateAppearance() to draw the new colour.ContentsGets or sets the text displayed for the annotation, or an alternate description of it (Contents); null when absent, and setting null removes it. Setting it keeps the appearance (RegenerateAppearance()).DictionaryGets the annotation dictionary.KindGets the standard type the annotation is, from its Subtype when it was read; Unknown for any other.LanguageGets the natural language of the annotation's text (Lang, PDF 2.0), or null.ModifiedGets the modification date (M) when it is a date (§7.9.4); null when absent or in another format, which is legal.ModifiedTextGets the modification date as stored (M, PDF 1.1), or null: a date string or text in any format.NameGets or sets the annotation name, unique among the annotations of its page (NM, PDF 1.4), or null; setting null removes it.NonStrokingOpacityGets the non-stroking opacity used when the appearance is regenerated (ca, PDF 2.0); default StrokingOpacity.OptionalContentGets the optional content group or membership dictionary that decides whether the annotation is visible (OC, PDF 1.5), or null.PageGets the page whose Annots array holds the annotation, or null when no page holds it (an annotation reached only from another one). Not the P entry, which is advisory: see PageObject.PageObjectGets the page object the P entry names (PDF 1.3), or null. Advisory: Page is the page that holds the annotation.RectGets or sets the annotation rectangle in default user space, normalized; setting it keeps the appearance, which §12.5.5 then maps onto the new rectangle; [0 0 0 0] when Rect is missing or malformed.ReferenceGets the indirect reference to the annotation dictionary, or null when the page's Annots array holds it directly.StrokingOpacityGets or sets the stroking opacity used when the appearance is regenerated (CA, PDF 1.4); default 1.0, and setting 1 removes the entry.StructParentGets the annotation's key in the structural parent tree (StructParent, PDF 1.3), or null.SubtypeGets the Subtype entry as stored (a string reads as the name it spells), or null when it is absent.ComputeAppearanceMatrix(PdfRectangle, PdfRectangle, Matrix)Computes the matrix that maps an appearance's form space to default user space so that the appearance fills the annotation rectangle: Algorithm "Appearance streams" of ISO 32000-2 §12.5.5.GetAppearance()Returns the normal appearance for the current appearance state.GetAppearance(PdfAppearanceMode, CosName)Returns the appearance for mode in the appearance state state, whatever AS says.GetAppearance(PdfAppearanceMode)Returns the appearance for mode and the current appearance state (AppearanceState).GetAppearanceMatrix(PdfFormXObject)Computes the matrix that places appearance on the annotation rectangle (§12.5.5).IsVisible(PdfOptionalContentState)Returns whether the annotation's optional content (OC) leaves it visible in state.Move(Double, Double)Moves the annotation by an offset in default user space: its rectangle and every coordinate of its own (L, Vertices, InkList, Path, QuadPoints, CL), keeping its appearance, which §12.5.5 maps onto the moved rectangle.ProcessAppearance(PdfFormXObject, ContentProcessor, ContentOptions)Runs one of this annotation's appearance streams through the content interpreter, placed on the annotation rectangle, with limits and cancellation.ProcessAppearance(PdfFormXObject, ContentProcessor)Runs one of this annotation's appearance streams through the content interpreter, placed on the annotation rectangle.RegenerateAppearance()Draws a new normal appearance stream from the annotation's entries, replacing its appearance dictionary, for the subtypes the library creates: Text, Link, FreeText, Line, Square, Circle, Polygon, PolyLine, Ink, Highlight, Underline, Squiggly, StrikeOut and Stamp. Editing an annotation's entries keeps its appearance until this is called.RemoveOptionalContent()Removes the annotation's OC entry: it is no longer optional content.SetBorderWidth(Double)Sets the border width in points, as a solid border style dictionary (BS, PDF 1.2), keeping the appearance until RegenerateAppearance() is called.SetOptionalContent(PdfOptionalContentGroup)Makes the annotation optional content of group (OC): shown only while the group is ON.SetOptionalContent(PdfOptionalContentMembership)Makes the annotation optional content whose visibility membership decides (OC).