原文地址:http://www.51ask.org/question/229
使用mpdf 类。 官方网址 www.mpdf1.com
<?php include('./mpdf60/mpdf.php'); $mpdf = new mPDF('zh-CN'); $mpdf->useAdobeCJK = true; $mpdf->SetDisplayMode('fullpage'); $url = 'http://localhost/resume.html'; $strContent = file_get_contents($url); $mpdf->showWatermarkText = true; $mpdf->WriteHTML($strContent); $mpdf->Output(); //直接输出pdf内容 //$mpdf->Output('tmp.pdf',true);//保存成pdf文件 ?> 原文地址:http://www.51ask.org/question/229