How to Select Multi-Page Annotations in JavaScript (ES6) PDF Viewer

14 Aug 20261 minute to read

Select a multi-page TextMarkup annotation as a single annotation by enabling the [enableMultiPageAnnotation] (https://ej2.syncfusion.com/documentation/api/pdfviewer/#enablemultipageannotation) property (default: false).

The following example shows how to select, export, and import a multi-page annotation:

// Enable multi-page TextMarkup Annotation.
viewer.enableMultiPageAnnotation = true;

// Export Annotation
document.getElementById('export').addEventListener('click', () => {
  // exportAnnotation() serializes the annotation; store the result for round-tripping.
  viewer.exportAnnotation();
});

// Import Annotation.
document.getElementById('import').addEventListener('click', () => {
  viewer.importAnnotation("Add Export annotation file content");
});

Find the sample: Select a multi-page TextMarkup annotation as a single annotation