Mpdf different header for first page kartik mpdf
- By Preneesh AV --
- 13-Jan-2019 --
- 110 Comments
place right after the <body>
<htmlpageheadername="firstpageheader"style="display:none"><divstyle="text-align:center"> first page header</div></htmlpageheader><htmlpagefootername="firstpagefooter"style="display:none"><divstyle="text-align:center">first page footer</div></htmlpagefooter>
<htmlpageheadername="otherpageheader"style="display:none"><divstyle="text-align:center"> all page Header</div></htmlpageheader><htmlpagefootername="otherpagesfooter"style="display:none"><divstyle="text-align:center">all page footer </div></htmlpagefooter>
In CSS use following :
@page{ header: html_otherpageheader; footer: html_otherpagesfooter;}@page:first { header: html_firstpageheader; footer: html_firstpagefooter;}