我无法打开使用php html2pdf创建的PDF文件,即使使用浏览器我也能正确显示它 为什么呢?
<?php
ob_start();
?>
<page orientation="P" backtop="10mm" backbottom="30mm" backleft="10mm" backright="10mm" style="font-family:Century_Gothic">
some text
</page>
<?php
$content=ob_get_clean();
require_once(dirname(__FILE__).'/../../html2pdf/html2pdf.class.php');
$html2pdf=new HTML2PDF('P','A4','it');
$html2pdf->addFont('Century_Gothic','normal','Century_Gothic.php');
$html2pdf->WriteHTML($content);
$pdf=addslashes($html2pdf->Output('',true));
$html2pdf->Output("test.pdf","F");
?>