Php html2pdf如何在每个页面中添加页脚?
我已经看过了他们的例子,但在我的例子中,我包含了很多html文档,所以我不能使用它们 下面是我正在使用的示例代码Php html2pdf如何在每个页面中添加页脚?,php,tcpdf,html2pdf,Php,Tcpdf,Html2pdf,我已经看过了他们的例子,但在我的例子中,我包含了很多html文档,所以我不能使用它们 下面是我正在使用的示例代码 require(dirname(__FILE__).'/html2pdf-new/vendor/autoload.php'); //$pdf=new HTML2FPDF("P","mm","A4"); $pdf=new HTML2PDF("P","A4","en"); //$pdf->AddPage(); $file="pdfs/$id"."_test
require(dirname(__FILE__).'/html2pdf-new/vendor/autoload.php');
//$pdf=new HTML2FPDF("P","mm","A4");
$pdf=new HTML2PDF("P","A4","en");
//$pdf->AddPage();
$file="pdfs/$id"."_test.html";
$fp = fopen($file,"r");
$strContent = fread($fp, filesize($file));
$pdf->WriteHTML($strContent);
//$pdf->AddPage();
$file="pdfs/$id"."_ptest.html";
$fp = fopen($file,"r");
$strContent = fread($fp, filesize($file));
$pdf->WriteHTML($strContent);
//$pdf->AddPage();
$file="pdfs/$id"."_ftest.html";
$fp = fopen($file,"r");
$strContent = fread($fp, filesize($file));
$pdf->WriteHTML($strContent);
$pdf->Output("pdfs/$subempid.pdf");