我有一个生成 HTML 字符串的 GWT 应用程序。我想将此字符串转换为图像,例如
<html>
<head> </head>
<body>
<several HTML elements including <img too>
</body>
</html>
我尝试使用Html2Image,当我在普通 Java 代码(使用主类)中本地测试它时,它可以工作
但是当我部署到 Google App Engine (GAE) 时,我得到:
java.lang.NoClassDefFoundError: java.awt.geom.Dimension2D is a restricted class.
Please see the Google App Engine developer's guide for more details.
at com.google.apphosting.runtime.security.shared.stub.java.awt.geom.Dimension2D.<clinit>(Dimension2D.java)
at gui.ava.html.image.generator.HtmlImageGenerator.<clinit>(HtmlImageGenerator.java:26)
at co.za.cre8.web.lottoShop.server.NotificationServiceImpl.geneateImage(NotificationServiceImpl.java:237)
at co.za.cre8.web.lottoShop.server.NotificationServiceImpl.sendMessage(NotificationServiceImpl.java:181)
很清楚问题是什么,是否有替代库?
提前致谢。铅