PHP:从HTML表格创建图像 [英] PHP : Creating image from html table

查看:86
本文介绍了PHP:从HTML表格创建图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在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.
Yes, the table is coming from the database.

解决方案

The best way is to convert first in a .ps, then jpg, pdf, or whatelse you need. I can suggest you 2 links: html2ps

wkhtmltopdf

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屋!

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