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.
精彩评论