Foxit PDF SDK for Web

How to Create Hyperlinks with Foxit PDF SDK for Web

Adding hyperlinks with Foxit PDF SDK for Web allows you to link to different documents on the web. When the PDFUI or PDFViewer is initialized with Foxit PDF SDK for Web, you can add in a custom parameter which is configured as follows:

Note: Return false means that the default action is not executed and is handled by the user.

let PDFUI = UIExtension.PDFUI;
let pdfui = new PDFUI({
 viewerOptions: {
 libpath: '../../../lib',
 jr: {
 licenseSN: licenseSN,
 licenseKey: licenseKey
 },
 customs:{
 URIActionCallback: (uri)=>{
 console.log('Link uri:' + uri);
 return false;
 },
 launchActionCallback: (fileSpec)=>{
 console.log('File link:' + fileSpec.fileName);
 return false;
 }
 }
 }
 renderTo: '#pdf-ui',
 fragments: []
 });

Updated on August 21, 2019

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: