PHP:从HTML表格创建图像 [英] PHP : Creating image from html table
问题描述
我可以在PHP中获得一些示例代码,用于将html表转换为图像
形式(.gif,.jpg或任何格式)?
是的,表格来自数据库。
最好的方法是首先转换.ps格式,然后转换为JPG,pdf或whatelse。
我可以建议你2个链接:
html2ps
wkhtmltopdf 经过测试,两者都完美无瑕...... html2ps稍微慢一点(3页pdf大约30秒,不知道jpg),但更多的可定制。 Can I get some sample code in PHP for converting an html table to image
form(.gif,.jpg or any format)? I am using XAMPP on Windows. The best way is to convert first in a .ps, then jpg, pdf, or whatelse you need.
I can suggest you 2 links:
html2ps Tested both, and both works perfectly... html2ps is little slow (~30 sec for a 3 pages pdf, dunno about jpg) but more customizable.
Give them a look 这篇关于PHP:从HTML表格创建图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
给他们看看
Yes, the table is coming from the database.