开发者

How to convert an html webpage to a picture

How to convert an html webpage to a picture like google preview.

Is there a Java library permitting this?

Is there a command-line argument to call browsers to make them convert a web page into a pi开发者_如何学运维cture .png for instance?


Using Qt, you can create a simple window with a QWebView (this is webkit under the covers), and then use QWidget::render() method to get QPixmap, and then convert it to QImage.

Qt is C++, but python and java bindings exist also.


http://www.roseindia.net/java/example/java/swing/Print.shtml

Here's a way to do it!


See here. It shows that iText and FlyingSaucer (xhtmlrenderer) have such options.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜