使用dompdf时,jquery结果未加载到pdf中

时间:2013-07-05 06:04:30

标签: php dompdf

我正在开发一个报告应用程序,我使用dompdf来创建pdf报告。 我想将图表加载到pdf结果,但它没有结果。但当我在浏览器中查看它显示我的预期结果,但当我保存到pdf它没有加载图表.. 这是我创建的函数

function pdf_create($html, $filename, $paper, $orientation, $stream=TRUE)
        {
            require_once("dompdf/dompdf_config.inc.php");
            spl_autoload_register('DOMPDF_autoload');

            $dompdf = new DOMPDF();
            $dompdf->set_paper($paper,$orientation);
            $dompdf->load_html($html);
            $dompdf->render();
            if ($stream) {
            $dompdf->stream($filename.".pdf");
            } else {
            $CI =& get_instance();
            $CI->load->helper("file");
            write_file($filename, $dompdf->output());
            }
        }

1 个答案:

答案 0 :(得分:-1)

使用MPDF。从html内容创建Pdf文件非常好。

http://www.mpdf1.com/mpdf/index.php