Open harishsalian05 opened 8 years ago
There does appear to be a bug in the 0.7.0 beta where dompdf attempts to construct a full URI before rendering the link. This is causing dompdf to use the wrong linking mechanism.
Named anchors work in v0.6.2 and earlier, but there is a minor issue you have to work around. In those versions named anchors are removed if they're empty.
So instead of something like:
<p><a href="#ch2">Chapter 2</a></p>
<!-- lots of content -->
<a name="ch2"></a>
<h2>Chapter 2</h2>
you'll need to do this:
<p><a href="#ch2">Chapter 2</a></p>
<!-- lots of content -->
<h2><a name="ch2">Chapter 2</a></h2>
The bug in 0.7.0 beta was due to the change introduced by df0bc000c5e0ecaf33ba1e3eb234632f427909cc, which I have fixed.
Still, the anchor linking could use a bit more work. I'll leave this open as a reminder to address the issue around empty named anchors elements and lack of support for ID linking. We should also try to better target the PDF action that takes you to the anchor.
Thanks for the update Brian :-) I will check and update you. Thanks again for your inputs.
@bsweeney: sorry for jumping on an old issue but I am having a problem with dompdf v0.7.0
rendering a simple link such as <a href="http://www.google.co.uk">Google</a>
. The resulting PDF contains the link but it is not clickable. Switching to v0.6.2
and dompdf works fine. Am I missing something? Thanks
@u01jmg3 seems to be working ok. Do you have a sample HTML document and the resulting PDF? Are you running the final 0.7.0 release?
False alarm - I tried again from the beginning and it is working without issue. User error. Apologies for wasting your time.
No worries, glad it worked out.
@u01jmg3 What was causing the issue for you? I have the same problem…
This is from a while ago but I think I just reloaded my dependencies from scratch. I would suggest doing the same with the latest version of dompdf.
@bsweeney Thanks. It works.
A Tag link & Anchoring is not working, on PDF generation the text gets highlighted blue but its not clickable.
Kindly help!! Tried latest beta release, version 0.6.2, 0.6.0. Cant get through.
Any help is appreciated.