mPDF Manual – mPDF Variables

# 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.

\$h2toc

Values