How to get the Selected Annotation?

Hey Guys,

How can I identify in C# Code what ANNOTATION was selected by user?
For example, based on image attached, How can I identify the ANNOTATION_2 are in focus?

Thanks in advanced...

Best regards!



1 Reply 1 reply marked as answer

AA Akshaya Arivoli Syncfusion Team October 5, 2020 11:22 AM UTC

Hi Denilson , 
 
Thank you for contacting Syncfusion support. 
 
We can identify the selected annotation in UI by using the annotationSelect event available in PDF Viewer. Please find the code snippet from the below, 
 
<SfPdfViewerServer Width="1060px" Height="800px"DocumentPath="@DocumentPath" @ref="oViewer"> 
    <PdfViewerEvents AnnotationSelected="@AnnotationSelect"></PdfViewerEvents> 
     
</SfPdfViewerServer> 
 
@functions 
{ 
 
 
 
 
    SfPdfViewerServer oViewer; 
    public string DocumentPath { get; set; } = "wwwroot/Data/PDF Succinctly.pdf"; 
public void  AnnotationSelect(Syncfusion.Blazor.PdfViewer.AnnotationSelectEventArgs args) { 
 
 
    } 
 
} 
 
 
 
 
Please try it and revert us with more details if any concerns on it. 
 
 
 
Regards, 
Akshaya   


Marked as answer
Loader.
Up arrow icon