mPDF Manual – HTML control tags

sethtmlpagefooter

(mPDF ≥ 2.0)

sethtmlpagefooter – Set an HTML page footer by a given name

Description

< sethtmlpagefooter [ $name ] [ $page ] [ $value ]  />

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

Parameters

$name

This parameter specifies the name of a previously defined HTML page footer. If a BLANK string or null is passed, mPDF will use the value '_default' if such a page footer 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 footer for ODD or EVEN pages in a DOUBLE-SIDED document.

Default: 'ODD'

Note: setting this value to BLANK will not clear the footer; set $value to '-1' or 'off' to cancel the header

Values (case-insensitive)

  • 'O' or 'ODD' - set the footer for ODD pages in a DOUBLE-SIDED document, or for both ODD and EVEN in a SINGLE-SIDED document.
  • 'E' or 'EVEN' - set the footer for EVEN pages
  • 'ALL' - sets the footer for both ODD and EVEN pages.

If the $page value is BLANK or omitted - sets the footer 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 footer from the current position in the document.

Values (case-insensitive)

  • '1' or 'ON' - start using this named footer
  • '-1' or 'OFF' - stop using a footer

Default: BLANK is ignored, making no changes to the current state

Changelog

Version Description
2.0 The function was added.

Examples

For examples and further information please see:

See Also

Fork me on GitHub