Add/Remove all annotation in PDFViewer

Hello,

I would like to be able remove all annotation programmatically in an opened SfPdfViewer. I have not found the answer in the documentation
Is it possible to do ?

And I import annotation with this line : await Viewer.ImportAnnotation(selectedProp.AnnotationFileName, AnnotationDataFormat.Json);
Is there an other way programmaticaly ? 

Thanks
Nicolas


2 Replies 1 reply marked as answer

VS Vasugi Sivajothi Syncfusion Team February 23, 2021 04:30 PM UTC

Hi Nicolas, 
 
Please find the details, 
 
Query 
Details 
I would like to be able remove all annotation programmatically in an opened SfPdfViewer. I have not found the answer in the documentation 
Is it possible to do ? 
 
We can delete all the annotations using deleteAnnotations method. Please refer to the below code snippet and sample, 
 
Code Snippet: 
 
<button @onclick="delete">Delete Annotations</button> 
 
private void delete() 
    { 
        PDFViewer.DeleteAnnotations(); 
    } 
 
 
 
 
And I import annotation with this line : await Viewer.ImportAnnotation(selectedProp.AnnotationFileName, AnnotationDataFormat.Json); 
Is there an other way programmaticaly ?  
 
 
We don’t have other options to add all the annotations programmatically in our PDF Viewer. We can only add the annotations programmatically using ImportAnnotation method. 
 
 
Please let us know if you have any concerns, 
 
 
Regards, 
Vasugi 


Marked as answer

NN Nicolas NOEL February 23, 2021 04:48 PM UTC

Hello,

Thank you.

Nicolas

Loader.
Up arrow icon