On Sun, 12 Apr 2020, Josh wrote:

On Sat, 11 Apr 2020, Giuseppe D'Angelo via Interest wrote:

 This should "just work". Are the links correctly inserted in the document?
 Does it work if you use document->print() and print directly on a PDF?

 HTH,

Thanks, that does help.

I was making a silly mistake. I am able to make external links work now. I'm still having trouble with internal links to other parts of the PDF though.

If I use myCursor->insertHtml("<a href=\"#link\">click link</a>") to insert, I get a link, but it won't scroll to other parts of the document linked with:

<a name="link"></a> OR

<span id="link">Text here</span> also didn't work.

(I'm assuming span id isn't part of the supported HTML subset, didn't see it say it was supported)

Okular and Chrome both recognize the <a href> as a link. Okular opens dolphin when I click it and Chrome does nothing.

What am I missing?

Also, FYI, when I export the document to html, the internal and external linking both work. But when I print to PDF, the link is there but doesn't work with either okular or chrome... If anyone gets internal linking in a PDF printed from a qtextdocument let me know. TIA

Josh
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to