hyperlinks that span lines make all of both lines clickable #2422
Comments
Thanks for the very good bug report, I can confirm this is the case even with the development version. |
Looks like |
Maybe the link could be split into two pieces (two separate hyperlinks pointing to the same destination), one per line? |
Yeah, that's what I meant by changing the signature -- it would have to report multiple non-overlapping areas separately instead of a single area i.e. two segments of each line instead of a single block. If I'm going to change that, might as well look at other issues in this area (even some that you reported 😄) before changing the approach. |
Having problems with this as well. I'm also seeing that two links on the same line makes the whole line clickable... but to only one of the links. |
Hey, I would like to take a look at this or help fix the issue as I currently use this project. I have looked into the QWebPrinter::elementLocation() and was unable to really pinpoint where that is in the files and how to go about addressing this issue. |
This issue happens in Windows 10 as well. |
Bump, any update on this? @ashkulz |
Not a fix, but an ok workaround -- I used PHP DOM to preprocess the HTML before sending to wkhtmlpdf. If you split the text of each link on space, then link each word separately, concat them, and replace the original link, it works. Put a space after each word (except the last) and (at least in my tests) you can't even tell by looking at the PDF. But yeah, a fix would be good :) |
When a hyperlink (
<a href...>
) spans a line, clicking anywhere in either of the lines will activate the link.I'm not using any command-line options (just 'wkhtmltopdf in.html out.pdf').
I'm running it under Kubuntu 14.04, and here's some more detail:
wkhtmltopdf -V outputs:
wkhtmltopdf 0.12.1 (with patched qt)
uname -srvp outputs:
Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
Here's an HTML file that demonstrates this bug:
A workaround I've found is to replace all spaces in the link text with
's so the link doesn't wrap.The text was updated successfully, but these errors were encountered: