Convert php page to pdf on the fly
Possible Duplicate:
Convert HTML + CSS to PDF with PHP?
I want to convert page like this http://alexking.org/projects/html-resume-template/demo/resume.php to pdf on the fly by a link inside the page, I tried dompdf but failed to have the result.
I has some success with HTML2PDF, give it a try. Example:
$content = get_include_contents('/resume.php');
require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf->WriteHTML($content);
$html2pdf->Output('example.pdf');
Check out Zend_PDF(), which provides all possibilities. If you need a bigger freedom and other formatting, I'd recommend to use latex and a latex2pdf
-call, but this one might be a bit much for what you want to achieve.
Unfortunatly, I haven't seen a decent html2pdf-generator so far.
那么http://www.php.net/manual/en/pdf.examples-basic.php?
链接地址: http://www.djcxy.com/p/15584.html上一篇: 如何使用CSS引导类从HTML生成PDF
下一篇: 即时将php页面转换为pdf