Speaktech.in

Mpdf different header for first page kartik mpdf

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>

<htmlpageheader
name="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;}