使用Codeigniter将HTML + CSS转换为PDF [英] Convert HTML+CSS to PDF using Codeigniter

查看:210
本文介绍了使用Codeigniter将HTML + CSS转换为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

使用PHP将HTML + CSS转换为PDF?

有没有Codeigniter库,我们将HTML / CSS页面转换为PDF?我相信 WKHTMLTOPDF 有效,但说明(需要MochiWeb)安装似乎对我来说太复杂。是否有一个更容易的解决方案,如在插件/库中删除并让它工作?

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?

推荐答案

有一些HTML PDF库在那里, MPDF 是优秀的和免费的。 PrinceXML 是迄今为止最好的功能集和输出,但它是昂贵的。

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.

所有这些都有PHP包装器,但没有特定的Codegigniter。对于大多数人来说,它们大部分都是在Libraries目录中安装,只需创建一个新的类实例来运行它们即可。

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.

这篇关于使用Codeigniter将HTML + CSS转换为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆