How to Handle Overlapped Annotations in JavaScript (ES6) PDF Viewer

14 Aug 20261 minute to read

Use the [annotationCollection] (https://ej2.syncfusion.com/documentation/api/pdfviewer/#annotationcollection) property of the [annotationSelect] (https://ej2.syncfusion.com/documentation/api/pdfviewer/#annotationselect) event to get overlapped annotations when the user clicks an annotation.

The following example shows how to access overlapped annotations on click:

// Get overlapped annotation collections.
viewer.annotationSelect = (args: any) => {
  console.log(args.annotationCollection);
}

Find the sample: Get overlapped annotations on click