Wkhtmltopdf with patched qt has support for PDF outlines also known as book marks, this can be enabled by specifying the
--outline switch. The outlines are generated based on the
<h?> tags, for a in-depth description of how this is done see the Table Of Content section.
The outline tree can sometimes be very deep, if the
<h?> tags where spread to generous in the HTML document. The
--outline-depth switch can be used to bound this.