Convert HTML+CSS to PDF using Codeigniter
Possible Duplicate:
Convert HTML + CSS to PDF with PHP?
Is there a Codeigniter library for us to convert a HTML/CSS page into a PDF? I believe WKHTMLTOPDF works but the instructions (requiring MochiWeb) to install it seem too complicated for me. Is there an easier solution like dropping in a plugin/libary and getting it to work?
There are a number of HTML to PDF libraries out there, MPDF is excellent and free. PrinceXML is by far the best in terms of it's feature set and output, but it's expensive.
All of these have PHP wrappers, but nothing specific for Codegigniter. That said for most of them, it's east to install them in the Libraries directory and simply just run them by creating a new instance of the class.
You can use wkhtmltopdf which essentially uses the webkit engine to render the page, so the CSS support should be optimal.
I don't know about a specific integration into CI, but it should be straight forward.
链接地址: http://www.djcxy.com/p/15576.html上一篇: 导出一个php页面为pdf