SetHTMLHeader()
(mPDF ≥ 1.2)
SetHTMLHeader – Sets an HTML page header
Description
void SetHTMLHeader ( string $html [, string $side [, boolean $write ]])
Set an HTML page header.
Parameters
- $header
-
This parameter specifies the content of the page header as a string of valid HTML code.
Default: BLANK
- $side
-
Specify whether to set the header for ODD or EVEN pages in a DOUBLE-SIDED document.
Values (case-sensitive)
'O'
- set the header for ODD pages'E'
- set the header for EVEN pagesDefault: BLANK, which sets
'O'
- $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
Note: Important Difference
- SetHeader() and SetFooter() called without specifying a $side sets both ODD & EVEN headers/footers;
SetHTMLHeader()
and SetHTMLFooter() without a $side - sets ODD page header/footer only as default
Changelog
Version | Description |
---|---|
1.2 | The function was added. |
Examples
For examples and further information please see: