mPDF Manual – HTML control tags

pageheader

(mPDF >= 2.0)

pageheader – Define a page header with a given name

Description

<pageheader [ $name ] [ $content-left ] [ $content-center ] [ $content-right ] [ $header-style ] [ $header-style-left ] [ $header-style-center ] [ $header-style-right ] [ $line ] />

Define a page header with a given name. Named headers can be referenced and set later in the document e.g. <setpageheader>

Attributes

$name

This attribute is a text string to use as the name for this header.

If name is BLANK or omitted, it is set as _default.

$content-left
$content-center
$content_right

Defines the text to appear in the page header.

At least one content- must be defined.

Values

  • $content-left: Text to appear at left margin
  • $content-center: Text to appear in centre of page
  • $content-right: Text to appear at right margin
$header-style
$header-style-left
$header-style-center
$header-style-right

This attribute can optionally set CSS style properties for the page header.

$header-style will set the same style for left, right and center content, whereas $header-style-left, $header-style-center and  $header-style-right set the style for one part of the content only.

Values

Valid CSS inline style declaration but only 5 properties can be set:

  • font-family
  • font-size
  • font-weight
  • font-style
  • color

If style is not set, the default values for the document are used.

$line

If set to "1" or any positive value, a line will be drawn below the header.

Changelog

Version Description
2.0 The tag was added.

Examples

For examples and further information please see:

See Also

Fork me on GitHub