On text highlights selection completed event in the pdf viewer control

Hello,


I'm considering your UI kit to be used in my project, but I need to catch the event of highlighting text as it is with TextSelectionCompleted event, is it possible?
Maybe there is another way to detect highlights/annotation changes that are made in the document?

Best regards,
Nicolas

10 Replies 1 reply marked as answer

VS Vasugi Sivajothi Syncfusion Team February 12, 2021 10:59 AM UTC

Hi Nicolas, 
 
 
Thanks for contacting Syncfusion support. 
 
We can get the annotation details using annotationAdd event. Please refer to the below code snippet and sample, 
 
Code Snippet: 
 
 
<PdfViewerEvents AnnotationAdded="annotationAdd"> 
 
@code{ 
     
    public void annotationAdd(AnnotationAddEventArgs args) 
    { 
         
    } 
} 
 
 
 
 
 
Kindly try it and revert us with more details if you have concerns. 
 
 
Regards, 
Vasugi 



NN Nicolas NOEL February 12, 2021 12:36 PM UTC

Hi Vasugi,

Thank you for answer and the sample.
But it's possible to get the selected text without set an annotation only on the select text event ?

Best regards,
Nicolas


VS Vasugi Sivajothi Syncfusion Team February 15, 2021 11:02 AM UTC

Hi Nicolas, 
 
 
Thanks for the update. 
 
 
We can get the selected text without set an annotation using OnTextSelectionEnd event. Please refer to the below code snippet and sample. 
 
 
Code Snippet: 
 
 
 
<PdfViewerEvents OnTextSelectionEnd="selectionEnd"></PdfViewerEvents> 
 
 
 
@code { 
public void selectionEnd(TextSelectionEndEventArgs args)
{

}
 
} 
 
 
 
 
 
Please let us know if you have any concerns about this. 
 
 
 
Regards, 
Vasugi 


Marked as answer

NN Nicolas NOEL February 15, 2021 04:33 PM UTC

Hi Vasugi,

Thanks I have all my answers.

Have a nice day
Regards
Nicolas


NN Nicolas NOEL April 1, 2021 12:38 PM UTC

Hi Vasugi,

Is it possible to have text with mutliline selection formated with the carriage return? Because actally I have this text on a pdf document :


And in the event it's return in one line like this in the textcontent variable 



Thank you
Nicolas



DM Dhivyabharathi Mohan Syncfusion Team April 2, 2021 11:19 AM UTC

Hi Nicolas, 
  
 
Thanks for the update. 
 
Currently, we do not have support to get the text with multiline selection format in the textSelection event. However, we will analyze further on this and update you with more details on April 7, 2021. 
 
 
Regards, 
Dhivya. 



SM Selvakumar Murugan Syncfusion Team April 7, 2021 05:25 PM UTC

Hi Nicolas, 

Sorry for the Inconvenience. 

Currently we are checking on this with high priority. We will provide further details on 12th April 2021. 

Regards,
Selvakumar 



DM Dhivyabharathi Mohan Syncfusion Team April 12, 2021 11:01 AM UTC

Hi Nicolas, 
 
We have already provided the support for retrieving the text with the new line characters. We suspect that the text in the PDF document does not contains the newline characters. So that it is not available in the event arguments. So please share the PDF document in which you have faced the issue. It will be helpful for us to analyze further and provide details. We have shared the screenshot for your reference. 
 
 
 
Regards, 
Dhivya. 



NN Nicolas NOEL April 19, 2021 03:20 PM UTC

Hi Dhivya

"So please share the PDF document in which you have faced the issue. It will be helpful for us to analyze further and provide details. We have shared the screenshot for your reference"

I send you the pdf in attachement. I can open the pdf with adobe reader dc and make copy and paste in windows bloc note with the newline characters.




Thanks,
Nicolas

Attachment: facture_9000910047_20190904_Orange_MAFR__Nø5731347495__TEXTE__RUN_1467a4c3.zip


DM Dhivyabharathi Mohan Syncfusion Team April 20, 2021 10:14 AM UTC

Hi Nicolas, 
 
 
We checked further with the document you have shared and found that the selected text is displayed in multi-line as in the PDF document. We have shared the sample and the screenshots for your reference. 
 
 
Screenshot: 
 
 
 
 
Selected text displayed in multi-line: 
 
 
 
 
Kindly try this and revert by modifying the sample which we provided to replicate the reported issue. It will be helpful if we know the version you are working with. This will help us to investigate further and provide details. 
 
 
 
Regards, 
Dhivya. 


Loader.
Up arrow icon