itVincent Blog - Java Working Fun!

技术引领时代!
posts - 117, comments - 181, trackbacks - 0, articles - 12

导航

<2011年7月>
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(5)

我参与的团队

随笔分类(70)

随笔档案(117)

文章档案(12)

相册

收藏夹(1)

我的BLOG

我的朋友BLOG

搜索

  •  

积分与排名

  • 积分 - 306768
  • 排名 - 187

最新评论

阅读排行榜

评论排行榜

用java将html转化生成png,gif,jpg等图片

Posted on 2011-07-30 11:58 itVincent 阅读(4299) 评论(0)  编辑  收藏 所属分类: Ajax

http://code.google.com/p/java-html2image/

 例子:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator
.loadHtml("<b>Hello World!</b> Please goto <a title=\"Goto Google\" href=\"http://www.google.com\">Google</a>.");
imageGenerator
.saveAsImage("hello-world.png");
imageGenerator
.saveAsHtmlWithMap("hello-world.html", "hello-world.png"

只有注册用户登录后才能发表评论。


网站导航: