function addToc() { $options = array('paging' => true, 'links' => true, 'toc-bookmarkText' => 'toc', 'toc-preHTML' => '<h1 class="toc">Contents</h1>', 'toc-margin-left' => 15, 'toc-margin-right' => 15); $this->mpdf->TOCpagebreakByArray($options); }