Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

PDF Hyperlinks not Clickable

Open arrigonyc opened this issue 1 year ago • 1 comments

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

arrigonyc avatar Mar 04 '23 18:03 arrigonyc

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

laercioacj avatar Mar 06 '23 11:03 laercioacj