我想尝试在这些PDF上添加页眉和页脚
$header = $this->loadpo->popdfheader(['pono'=>$pono,'tblpo'=>$tblpo]);
$content = $this->loadpo->popdf(['pono'=>$pono,'tblpo'=>$tblpo]);
$footer = $this->loadpo->popdffoot(['pono'=>$pono,'tblpo'=>$tblpo]);
ob_clean();
//new mPDF($mode, $format, $font_size, $font, $margin_left, $margin_right, $margin_top, $margin_bottom, $margin_header, $margin_footer, $orientation);
$mpdf=new mPDF('c','A4-L','','' , 5 , 5 , 5 , 0 , 0 , 0);
$mpdf->SetDisplayMode('fullpage');
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->SetHTMLHeader($header);
$mpdf->WriteHTML($content);
$mpdf->SetHTMLFooter($footer);
$mpdf->Output(SERVER_ROOT.'/public/uploads/'.$file.'.pdf', 'F');
$mpdf->Output();
根本不工作。我的页眉显示每一页。我希望标题只显示第一页,而不是每一页。我该怎么办??
NB:我的html代码就像通常的html代码一样,没有sethtmlpageheader
之类的代码,或者诸如此类的普通html代码。