(mPDF ≥ 2.0)
setpageheader – Set a page header by a given name
< setpageheader [ $name ] [ $page ] [ $value ] [ $show-this-page ] />
Sets a page header that has previously been defined by name.
Note: This function/method was altered in mPDF 2.2 by capitalising the first letter of the name. As function/method names in PHP have hitherto been case-insensitive, this should not cause any problems, but it is recommended where possible to use the preferred spelling.
This parameter specifies the name of a previously defined page header. If a BLANK string or
nullis 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
Specify whether to set the header for ODD or EVEN pages in a DOUBLE-SIDED document.
Note: setting this value to BLANK will not clear the header; set $value to
'off'to cancel the header
'ODD'- set the header for ODD pages in a DOUBLE-SIDED document, or for both ODD and EVEN in a SINGLE-SIDED document.
'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.
Specify whether to start or stop showing the named header from the current position in the document.
'ON'- start using this named header
'OFF'- stop using a header
Default: BLANK is ignored, making no changes to the current state
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.
Note: $show-this-page forces the appropriate header to be written. If you have just defined an ODD-sided header and the document is currently writing to an EVEN-sided page, the EVEN header will be output.
|The function was added.
For examples and further information please see: