mPDF Manual – mPDF Variables

anchor2Bookmark

anchor2Bookmark – Specifies whether PDF Bookmarks are created automatically from HTML anchors

Description

void anchor2Bookmark = 0|1

Specifies whether PDF Book marks are created from HTML anchors (e.g. <a name="Introduction" />) .

Values

Set the variable with one of the values.

  • 0 - does not generate a bookmark
  • 1 - generate a bookmark using the text value of the name="Text" attribute

Default: 0

Usage

Set at document initiation

<?php
$mpdf = new \Mpdf\Mpdf(['anchor2Bookmark' => 1]);

See Also

Fork me on GitHub