Custom items in pdf viewer context menu

Hi,

could you please advise how to add additional items to the pdf viewer default context menu (copy/highlight/underline/strikethrough)?



6 Replies

JP Jhansi Priya Ramesh Syncfusion Team March 17, 2020 11:15 AM UTC

Hi Roman, 
 
Greetings from contacting Syncfusion support.   
   
At present, there is no support in PdfViewer to customize the context menu. Could you please share details on your requirement to add additional items in the context menu, so that it will be helpful for us to provide you a better solution.  
 
 
Regards, 
Jhansi Priya Ramesh 



RO Roman April 5, 2020 07:27 PM UTC

Hi Jhansi Priya Ramesh,

We have requirements of adding custom text items in the default context menu (which appears when text in pdfViewer is selected). 
We need to handle our custom items based on various logic. 
So that's why it would be nice to have: 
1) option to add text items to the default context menu (with event/callback-delegate method, see below point)
2) providing event or delete method (callback) which is called when the user clicks on our custom text item. 
3) In the event argument or callback should be SelectedText.

Basically that would be enough to implement our solution, thank you very much!


AV Ashokkumar Viswanathan Syncfusion Team April 6, 2020 12:59 PM UTC

Hi Roman, 
 
Currently we are checking on this and we will update shortly.  
 
Regards, 
Ashok Kumar Viswanathan. 



AV Ashokkumar Viswanathan Syncfusion Team April 6, 2020 01:23 PM UTC

Hi Roman, 
 
 
Based on your previous update, we assume that you like to add and perform operation like "Search" when text in PDF Viewer is selected in the custom context menu. Can you please confirm us whether this is what you have mentioned as "Requirements of adding custom text items in the default context menu (which appears when text in pdfViewer is selected)" in your update. If our understanding is different from your requirement, could you please explain briefly about your requirement/use case scenario?. It will be useful for us to investigate further on this and assist you with the better solution at the earliest.   
 
 
Regards, 
Ashok Kumar Viswanathan. 



RO Roman April 21, 2020 11:22 PM UTC

Hi Ashokkumar Viswanathan,
Actually we do not need 'search'. We would like to add our custom commands like 'translate' selected text and others. 
So we need to implement our custom handlers when custom items like 'translate' is selected. 

For example, we added programmatically several custom items in context menu such as 'translate', 'add to dictionary', etc. 
Then the user selects sentence, and context-menu appears which includes custom items such as 'translate', 'add to dictionary' and others.
When the user clicks on a custom item 'translate' we need to handle it (with selected text) and implement our own custom logic. 

So we suggested previously to have the option to add text items to the default context menu (with the TapEvent which we can handle).

Does it make sense? 



AV Ashokkumar Viswanathan Syncfusion Team April 22, 2020 04:38 PM UTC

Hi Roman, 
 
At present, we do not have support to add custom items in text selection context menu and provide events for each item. We do not have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest.      
       
Based on our present commitments and the above parameters, this feature is expected to be implemented in our 2020 Volume 4 main release. We will let you know when this feature is implemented.     
    
Disclaimer: The date for the feature implementation is tentative and not a commitment on our parts.      
      
You can now track the status of this feature request here,           
   
 
Regards,   
Ashok Kumar Viswanathan. 


Loader.
Up arrow icon