如何删除????来自dompdf发电机

时间:2015-09-03 10:59:03

标签: codeigniter dompdf

这是我的代码如何显示阿拉伯字体字母而不是问号和字体以包含在pdf中 功能

pdf_create($html, $filename, $stream=TRUE) 
    {
        require_once("dompdf/dompdf_config.inc.php");
        $date=date("m_d_Y");
        $filename = $filename.'_'.$date.'_'.rand();
        $dompdf = new DOMPDF();
        $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');   
        $dompdf->load_html($html);        
        $dompdf->render();
        $dompdf->stream("$filename".".pdf", array("Attachment" => false));
    } 

立即解决方案是等待来自yester的解决方案

1 个答案:

答案 0 :(得分:0)

此代码正常运行

在php页面中放下代码。 问题是我的css字体,所以只有我的阿拉伯字母?????在pdf

<meta http-equiv="Content-Type" content="charset=utf-8"/>

在css中

th
            {
                font-family: "DejaVu Sans Mono", monospace;
                /*font-family: "Helvetica", sans-serif;*/ This is wrong
                border: solid 1px black;
                font-size: 12px;
            }