Pressbooks\Modules\Export\Mpdf\Pdf::addToc PHP Method

addToc() public method

Note, the functionality of the TOC is limited: its behavior varies according mirrored margin settings, and will always generate blank pages after. http://mpdf1.com/forum/discussion/comment/6417#Comment_6417
public addToc ( )
    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);
    }