h2toc
(mPDF ≥ 5.7)
Description
boolean h2toc
When a valid array is set, mPDF will automatically generate entries for a Table of Contents using all heading
elements (H1 - H6) written to the document using WriteHTML()
.
Any number of levels may be specified, but the first level should be 0
and other levels should be consecutive.
Values
$h2toc
Values
-
An array should be specified mapping the headings to the required level of Table of Contents
e.g.
array('H1' => 0, 'H2' => 1, 'H3' => 2)
Default: array()