[Html2PdfConverter] HTML not getting converted to a clickable link

Forge Component
Published on 17 May by Guilherme Pereira
60 votes
Published on 17 May by Guilherme Pereira

Hi everyone.

I'm having trouble generating clickable links inside the pdf.

They appear correctly like you can see in the following image:

However the mouse does not show as clickable when hovering and I can't click it.

Is anyone else capable of reproducing this?

I'm currently in the version 1.1.13 but I've tried to upgrade to 1.1.14 and it still didn't work.

Best regards,

João Nunes

Hi João,

The component does not do the generation, It launches wkhtmltopdf that in turn generates the pdf. So upgrading it will have no effect on the way the pdf is generated.

You nay need to check on wkhtmltopdf website and try different versions of the library in order to understand what could be wrong.



Hi Joao,

Htmltopdf component internally uses wkht ltopdf libraries, you can find the the solution for clickable links in there

This thread may help please check


Hi, thanks for the tip regarding the libraries for pdf generation I will try to update and report back. 

Thank you.

I'm having the same issue, my link however is clickable (somewhere on the middle of the page).

I'm using a custom header and footer, the header is the problem here, adding a header adds a margin to the top of each page, which messes up the clickable area of links, it's a known bug on wkhtmltopdf, no real message of it being fixed though.

Your problem could be that your link has no content (<a>[content should go here to make the link clickable]</a>) it also needs to have a href/destination.

Hope somebody can fix the bug for the header though...

Hi Joey,

Have you tried the --margin-top option an set a 0px or negative value to balance the added space?



Guilherme Pereira wrote:

Hi Joey,

Have you tried the --margin-top option an set a 0px or negative value to balance the added space?



Setting --margin-top to 0 will remove my header :(

Doing this makes the link in the footer clickable in the correct position.

I found a solution, I created a fake link, which was invisible, and set a top -5cm to position it lower. Then I added a huge padding top and bottom to make the clickable range bigger. Though this is not a clean solution, it still allows users to click the link again.