php html2pdf无法在adobe reader上使用自定义字体打开pdf

时间:2017-03-08 16:55:43

标签: php pdf html2pdf adobe-reader

我无法打开使用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");
?>

0 个答案:

没有答案
相关问题