Forum Bugs

Internal link not working in PDF

runemadsen
Hey all

I have this weird problem with my HTML > PDF generation. I have a bunch of internal links that work like a charm, but one link that does not work in the PDF. The syntax for them are all the same. I'm also getting "See Page 0" on that link, while the other links add the correct page numbers.

The only difference in the syntax is that the broken link uses an a tag, and the other one's are H3 tags. But that shouldn't make a difference?

Is there an obvious error here? The broken link works perfectly in the HTML file when opened in a browser.

<a href="#test1">test1</a>
<a href="#test2">test2</a>
<a href="#test3">test3</a>
<a href="#test4">test4</a>

<h3 id="test1">Test 1</h3>
<h3 id="test1">Test 2</h3>
<h3 id="test1">Test 3</h3>
<a id="test4">
mikeday
Sorry about this, it's a Prince limitation where links to empty inline elements can stop working. Basically the empty inline element "disappears" if it is in a block context, and cannot be the target of links. It can be fixed by adding some text in the inline element, or putting it in an inline context like a paragraph, or changing it to a block element.
runemadsen
Thanks. I fixed it by setting the anchor tag's style to display:block and everything works.