mPDF Manual – mPDF functions


(mPDF ≥ 1.2)

SetHTMLHeader – Sets an HTML page header


void SetHTMLHeader ( string $html [, string $side [, boolean $write ]])

Set an HTML page header.



This parameter specifies the content of the page header as a string of valid HTML code.

Default: BLANK


Specify whether to set the header for ODD or EVEN pages in a DOUBLE-SIDED document.

Values (case-sensitive)

'O' - set the header for ODD pages

'E' - set the header for EVEN pages

Default: BLANK, which sets 'O'


If true it forces the Header to be written immediately to the current page. Use if the header is being set after the new page has been added.

Default: false


Version Description
1.2 The function was added.


For examples and further information please see:

See Also

Fork me on GitHub