开发者

How to convert HTML to image with PHP [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Screensho开发者_如何学Got of current page using PHP

How to convert HTML to image with PHP , have idea!!!


If you have Python, PyQt4 and Webkit installed on your server, you can use Webkit2PNG to do this: it downloads the page, fires up the Webkit rendering engine, and takes a snapshot.

Note that this could be resource-intensive; also, rendering can differ in various browsers (and in IE).


In order to get an image of a web page, you need software that can render a web page (that is, lay out elements, apply styles, and so on). Such software is typically called a "browser".

It's possible to automate a browser from PHP, using COM (like in sAc's answer) on windows, for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜