0

We want to use links in the pdf footer. We utilize wkhtmltopdf tool to generate our pdfs.

wkhtmltopdf wrongly places the clickable area few millimeters above the link itself bug screenshot

When we use absolute links in the footer like https://google.com pdf viewers recognize the links and allow to click on it enter image description here

But we would like to show custom text for our links like Terms and conditions and so on. As a possible workaround, we were trying to overlay our link text over a transparent link using absolute positioning (codepen). It works well for html but doesn't work for pdfs.

Do we have some other possible options to get around the issue?

2
  • We'd like to use something like this in the footer Terms and conditions
    – Gleb
    Commented Nov 9, 2022 at 15:51
  • Yes, it's a known issue with wkhtmltopdf link but we can't painlessly switch to another one
    – Gleb
    Commented Nov 9, 2022 at 15:59

1 Answer 1

2

We implemented a JS workaround where we duplicate footer content and move it down by 135px. So the footer replica is invisible to the end users but it provides clickable areas for the original footer. We could do it because we have constant top and bottom margins. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.