Print.js
Print.js copied to clipboard
PDF Hyperlinks not Clickable
Hello! I'm trying to print a PDF being generated from our backend that includes some hyperlink elements that should be clickable and navigate to a new url. However, when printed using print-js, the links are not clickable at all and just act like plain text.
Any ideas what might be wrong? I'm on version "print-js": "^1.6.0"
in "react": "^18.2.0"
and doing:
import printPDF from "print-js";
...
function handlePrint() {
if (pdfUrl && pdfUrl.data) {
printPDF(pdfUrl.data)
}
}
Opening the PDF natively with window.open
shows a pdf with clickable links so I'm confident the PDF is built correctly
Opening the PDF natively with
window.open
shows a pdf with clickable links so I'm confident the PDF is built correctly
When opening the pdf for printing (CTRL + P) it doesn't really offer an option to open links, but this is not a particularity of PrintJS