mPDF Manual – mPDF Variables

h2bookmarks

(mPDF >= 5.7)

Description

boolean h2bookmarks

When a valid array is set, mPDF will automatically generate PDF Bookmarks from 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

$h2bookmarks

Values

  • An array should be specified mapping the headings to the required level of Bookmarks

    e.g. array('H1' => 0, 'H2' => 1, 'H3' => 2)

Default: array()

Fork me on GitHub