Hi Nayan,
When loading the
document the documentLoad event is triggered within this event you can import
the annotation using importAnnotation method. We have provided the code snippet
and sample for this functionality.
Code snippet:
|
const documentLoad = (args: any) => {
var viewer = document.getElementById('container').ej2_instances[0];
viewer.importAnnotation(data);
}
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ImportAnnotationNextJS-1106601612.zip
Run the sample by
executing the following commands: `npm install` and `npm run dev`.
Additionally,
you can add new annotations using the addAnnotation method. Please refer to the below demo link for
this functionality.
Demo: https://ej2.syncfusion.com/react/demos/#/material3/pdfviewer/annotations