How to customize the behaviour when user clicks on an in-pdf link?

Product: Webviewer - React

Product Version: 8.1.0

Please give a brief summary of your issue:
Customise the behaviour when user clicks on a link in a pdf

Please describe your issue and provide steps to reproduce it:
We have built a hosted solution of Webviewer in React and are using this hosted solution for both, our web and our mobile applications(React Native). On the React Native end, we are using a Webview to access the hosted solution. The issue we are facing is that when a user clicks on a link inside the pdf, it opens the link inside the Webview itself which is something that we do not desire. We would like for it to open in a separate browser window outside the app.

Is there a way to detect the link press event and add a custom event trigger so that we can run our custom link press logic?

Hello there.

Here is an example of customizing the behavior of links on a PDF: How to prevent links from being opened on a PDF in WebViewer?

Let me know how that works for you and if you have any further questions.

Best Regards,
Diego Felix
Web Software Developer
PDFTron Systems, Inc.

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.

Hi Diego,

That worked perfectly for me. Thanks for the solution