请关注页脚部分。我想在页脚中显示一种分页。这就是我尝试过的:
<?php
//error_reporting(0);
ini_set("gd.jpeg_ignore_warning", 1);
set_include_path(get_include_path() . PATH_SEPARATOR . "dompdf");
require_once('dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF();
$html ='<script type="text/php">';
if ( isset($pdf) ) {
$footer = $pdf->open_object();
$font = Font_Metrics::get_font("helvetica", "bold");
$pdf->page_text(72, 18, "Header: {PAGE_NUM} of {PAGE_COUNT}", $font, 6, array(0,0,0));
$pdf->close_object();
$pdf->add_object($footer, "1");
}
$html = $html.'</script><html>TEST<br><br> ';
$html .='</html>';
$dompdf->load_html($html);
$dompdf->render();
$output = $dompdf->output();
file_put_contents("pdf_generated/file.pdf", $output);
header("Location: http://acros.netlogiq.info/pdf_generated/file.pdf");
?>
结果是:页脚中没有显示任何内容?我能做什么?