mPDF Manual – HTML control tags


(mPDF ≥ 2.0)

pagefooter – Define a page footer with a given name


<pagefooter [ $name ] [ $content-left ] [ $content-center ] [ $content-right ] [ $footer-style ] [ $footer-style-left ] [ $footer-style-center ] [ $footer-style-right ] [ $line ] />

Define a page footer with a given name. Named footers can be referenced and set later in the document e.g. <setpagefooter>



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

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


Defines the text to appear in the page footer.

At least one content- must be defined.


  • $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

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

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


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.


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


Version Description
2.0 The tag was added.


For examples and further information please see:

See Also

Fork me on GitHub