开发者

Converting HTML to an Image [duplicate]

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

Po开发者_高级运维ssible Duplicates:

Convert URL to screenshot (script).

PHP: How to capture browser window screen with php?

I have a URL and I want to convert that webpage screenshot to an image. Please let me know if we can do this using php or some other tools that can be used with PHP/Linux.


This isn't the best solution, but you could convert the HTML page to a PDF, then use imagemagick to convert the pdf to a jpeg using this command exec("convert sample.pdf sample.jpeg"). To convert HTML to pdf, see this question.

Convert HTML + CSS to PDF with PHP?


The shutter screenshot tool is able to do that.

It's in the menu: File -> New -> Web

Can be used with Linux and PHP on the same system. See the manpage for commandline options to be invoked from PHP.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜