Docx4j与Grails。将HTML转换为word文档 [英] Docx4j with grails. Convert HTML to word document

查看:673
本文介绍了Docx4j与Grails。将HTML转换为word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Grails 2.3.7中使用了Docx4j 3.1.0和Xalan 2.7.1。在这里我已经完成了docx4j与grails的集成,并且我能够生成word文档。但我希望将gsp或html模板传递给Docx4j并生成word文档。可能吗 ?如果是的话,该怎么做?以及如何传递可以在文档中显示的图像。 可以使用 docx4j-ImportXHTML ;请参阅示例


I'm using Docx4j 3.1.0 with Xalan 2.7.1 in grails 2.3.7. Here I've done the integration of docx4j with grails and I'm able to generate word document. But I want pass a gsp or html template to the Docx4j and generate word document. Is it possible ? And if yes, how to do it? As well as how to pass image which can be displayed in document.

解决方案

You can use docx4j-ImportXHTML; see the examples.

这篇关于Docx4j与Grails。将HTML转换为word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆