sethtmlheader MPDF不工作sethtmlheader MPDF不工作
我在HTML中幾頁,我有派駐,封面,該imagesonleft
每個人都有HTML:
<!DOCTYPE HTML>
問題是它沒有在pdf上打印頁眉或頁腳
$this->load->library('pdf');
$pdf = $this->pdf->load();
$pdf->debug = true;
$pdf->WriteHTML($html);
$pdf->SetHTMLHeader('<div style="text-align: right; font-weight: bold;">My document</div>',true);
$pdf->WriteHTML($htmlpresences);
$pdf->SetHTMLFooter('
<table width="100%" style="vertical-align: bottom; font-family: serif; font-size: 8pt; color: #000000; font-weight: bold; font-style: italic;"><tr>
<td width="33%"><span style="font-weight: bold; font-style: italic;">{DATE j-m-Y}</span></td>
<td width="33%" align="center" style="font-weight: bold; font-style: italic;">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">My document</td>
</tr></table>
');
鏈接不起作用了。檢查https://mpdf.github.io/headers-footers/headers-footers.html – Kiko