Skip to content

API reference / Common / AnnotationKind

Type Alias: AnnotationKind ​

ts
type AnnotationKind = 
  | {
  text: TextAnnotation;
}
  | {
  link: LinkAnnotation;
}
  | {
  freeText: FreeTextAnnotation;
}
  | {
  line: LineAnnotation;
}
  | {
  square: SquareAnnotation;
}
  | {
  circle: CircleAnnotation;
}
  | {
  polygon: PolygonAnnotation;
}
  | {
  polyLine: PolyLineAnnotation;
}
  | {
  highlight: TextMarkupAnnotation;
}
  | {
  underline: TextMarkupAnnotation;
}
  | {
  squiggly: TextMarkupAnnotation;
}
  | {
  strikeOut: TextMarkupAnnotation;
}
  | {
  stamp: StampAnnotation;
}
  | {
  caret: CaretAnnotation;
}
  | {
  ink: InkAnnotation;
}
  | {
  popup: PopupAnnotation;
}
  | {
  fileAttachment: FileAttachmentAnnotation;
}
  | {
  sound: SoundAnnotation;
}
  | {
  movie: MovieAnnotation;
}
  | {
  widget: WidgetAnnotation;
}
  | {
  screen: ScreenAnnotation;
}
  | {
  printerMark: PrinterMarkAnnotation;
}
  | "trapNet"
  | {
  watermark: WatermarkAnnotation;
}
  | {
  threeD: ThreeDAnnotation;
}
  | {
  redact: RedactAnnotation;
}
  | "projection"
  | "richMedia"
  | {
  unknown: {
     subtype: string;
  };
};

An annotation's /Subtype (§12.5.6) with the entries only that subtype carries. Subtypes the spec groups under one table share one payload: the four text-markup subtypes ([TextMarkupAnnotation]).

Variants are boxed so the enum stays the size of a pointer, the way GraphicsObjectContent's are.