Namespace: Annotations

Annotations

The namespace for anything to do with PDF annotations. You can access it as follows:

Examples

// 5.1 and after
WebViewer(...)
  .then(function(instance) {
    var Annotations = instance.Annotations;
    // Annotations.SomeClass
  });
// 4.0 ~ 5.0
var viewerElement = document.getElementById('viewer');
var viewer = new PDFTron.WebViewer(...);

viewerElement.addEventListener('ready', function() {
  var viewerIframe = document.querySelector('iframe');
  var Annotations = viewerIframe.contentWindow.Annotations;
  // Annotations.SomeClass
});

Classes

Annotation
Border
BoxControlHandle
BoxSelectionModel
ButtonWidgetAnnotation
CalloutControlHandle
CalloutSelectionModel
CaretAnnotation
CheckButtonWidgetAnnotation
ChoiceWidgetAnnotation
Color
ControlHandle
CustomAnnotation
EllipseAnnotation
Font
Forms
FreeHandAnnotation
FreeTextAnnotation
FreeTextSelectionModel
HTMLAnnotation
IPathAnnotation
LineAnnotation
LineControlHandle
LineSelectionModel
Link
ListWidgetAnnotation
MarkupAnnotation
PathControlHandle
PathSelectionModel
Point
PolygonAnnotation
PolygonControlHandle
PolygonSelectionModel
PolylineAnnotation
PopupAnnotation
Quad
RadioButtonWidgetAnnotation
Rect
RectangleAnnotation
RedactionAnnotation
RedactionSelectionModel
SelectionModel
SignatureWidgetAnnotation
StampAnnotation
StickyAnnotation
TextHighlightAnnotation
TextMarkupAnnotation
TextSelectionModel
TextSquigglyAnnotation
TextStrikeoutAnnotation
TextUnderlineAnnotation
TextWidgetAnnotation
WidgetAnnotation
WidgetFlags

Members


<static> SelectionAlgorithm

Represents static utility functions to determine hit testing for annotations.

Properties:
Name Type Default Description
canvasVisibilityPadding number 5

Defines a padding for the canvas visibility test algorithm. Increase this value to make selection more forgiving.