PDF export having some hyperlink

I am using Helical Insight 5.2.1

When I click on the header in a dashboard exported as a PDF, it navigates to some hyperlinks of the Helical Insight server. How can I disable this while exporting to PDF?

image

Hello,

  1. Inject the following JS code into the dashboard-level JS editor to disable hyperlinks in the PDF export

JS Code :

function removeLinkHrefs() {
var links = document.querySelectorAll('a');
links.forEach(link => {
link.dataset.href = link.getAttribute('href'); // Store the href
link.removeAttribute('href'); // Remove the href
link.style.cursor = 'default'; // Set cursor to default arrow
});
}
 
function restoreLinkHrefs() {
var links = document.querySelectorAll('a');
links.forEach(link => {
if (link.dataset.href) {
link.setAttribute('href', link.dataset.href); // Restore the href
delete link.dataset.href; // Remove the temporary attribute
}
link.style.cursor = ''; // Reset cursor style
});
}
 
// Remove links and set cursor before printing
window.addEventListener('beforeprint', removeLinkHrefs);
// Restore links and cursor after printing
window.addEventListener('afterprint', restoreLinkHrefs);

image

  1. Save the dashboard and try exporting it. Now it will work fine.

Thank You,
Helical Insight Team.