New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchors / internal links not working [solution] #3486

benedekh opened this Issue May 25, 2017 · 0 comments


None yet
2 participants

benedekh commented May 25, 2017

It is just a reminder to future self and everyone, who is struggling with the problem: "anchors, internal links not working in wkhtmltopdf 0.12.4 (or maybe earlier versions also)"


If you have an anchor whose content is empty, then they will be removed by WebKit. (Thank you @ashkulz for pointing it out!)

<a name="here"></a>
I want to go <a href="#here">there.</a>


Put anything within the anchor, and it should work now:

<a name="here">&nbsp;</a>
I want to go <a href="#here">there.</a>

This issue is linked to #1554, #2153, #2949, #2957 and maybe to some other PRs and issues also that I have not found yet.


I would like to say a huge thank you to @ashkulz for pointing out the issue with WebKit. I would also like to say thank you to any contributor who fixes (or has already fixed, e.g. @rpedela in #2957) this problem in a PR.

@benedekh benedekh closed this May 25, 2017

@benedekh benedekh changed the title from Reminder: anchors / internal links not working [solution] to Anchors / internal links not working [solution] May 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment