mPDF Manual – mPDF functions

SetHTMLHeaderByName()

(mPDF >= 2.0)

SetHTMLHeaderByName – Sets an HTML page header by a given name

Description

void SetHTMLHeaderByName ( string $name [, string $side [, boolean $write ]])

Sets an HTML page header that has previously been defined by name.

Parameters

$name

This parameter specifies the name of a previously defined HTML page header. If a BLANK string or NULL is passed, mPDF will use the value ‘_default’ if such a page header exists.

$side

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

DEFAULT: ‘O’

Values (case-sensitive)

O - set the header for ODD pages in a DOUBLE-SIDED document, or for both ODD and EVEN in a SINGLE-SIDED document.

E - set the header for EVEN pages

DEFAULT - sets the header for ODD in a DOUBLE-SIDED document, or for both ODD and EVEN in a SINGLE-SIDED document.

$write

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

Changelog

VersionDescription
2.0 The function was added.

Examples

For examples and further information please see:

See Also