Bookmark Issue when converting HTML to PDF
-
I am converting an html script to a pdf using QPrinter and QTextDocument, but can't seem to get any bookmarks to work in the pdf file that is created. I am aware that only a subset of HTML is supported and have followed the documentation in order to produce an html doc suitable for conversion to pdf using QPrinter and everything works fine except bookmarks which appear to just get ignored, even though the documentation gives the impression that anchors and links are supported. While I have both links to external docs and bookmarks in the html working, only the links to objects outside of the doc using href appear to work in the pdf.
Implementing the bookmark as followed:
<div id="bookmark"> </div> (also tried using name instead of id)
-- somewhere else in the code --
<a href="#bookmark"> name of bookmark </a>Is there something wrong with the way I have used the a tag? or does anyone know of another way of adding a bookmark in a document when converting from html to pdf?