mPDF Manual – HTML control tags

(mPDF >= 2.0)

setpageheader – Set a page header by a given name

## Description

< setpageheader [ $name ] [$page ] [ $value ] [$show-this-page ] />

Sets a page header that has previously been defined by name.

## Parameters

$name This parameter specifies the name of a previously defined page header. If a BLANK string or NULL is passed, mPDF will use the value ‘_default’ if such a page header exists. The$name does not need to be defined if you are setting the value to -1 or ‘off’

$page Specify whether to set the header for ODD or EVEN pages in a DOUBLE-SIDED document. DEFAULT: ‘ODD’ Note: setting this value to BLANK will not clear the header; set$value to -1 or off to cancel the header

Values (case-insensitive)

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

E or EVEN - set the header for EVEN pages

ALL - sets the header for both ODD and EVEN pages.

If the $page value is BLANK or omitted - sets the header for ODD in a DOUBLE-SIDED document, or for both ODD and EVEN in a SINGLE-SIDED document.$value

Specify whether to start or stop showing the named header from the current position in the document.

</span>

Values (case-insensitive)

1 or ON - start using this named header

-1 or OFF - stop using a header

DEFAULTBLANK is ignored, making no changes to the current state

$show-this-page If$show-this-page is set to “1” (or any positive value) 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: BLANK

## Changelog

VersionDescription
2.0 The function was added.

## Examples

For examples and further information please see: