有没有允许合并docx文件的java库(也许是poi?)? [英] Is there any java library (maybe poi?) which allows to merge docx files?

查看:159
本文介绍了有没有允许合并docx文件的java库(也许是poi?)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个可以合并docx文件的java应用程序。有什么建议吗?

I need to write a java application which can merge docx files. Any suggestions?

推荐答案

以下Java API可用于处理带有Java的OpenXML MS Word文档:

The following Java APIs are available to handle OpenXML MS Word documents with Java:

  • Apache POI XWPF
  • OpenOffice.org API
  • OpenXML4J
  • Docx4J

还有一个,但我不记得这个名字。

There was one more, but I don't recall the name anymore.

关于你的功能要求:合并两个文件在技术上很难实现结果,因为最终用户会期望。大多数API都不允许这样做。您需要从两个文档中提取所需信息,然后自己根据这些信息创建一个新文档。

As to your functional requirement: merging two documents is technically tricky to achieve the result as the enduser would expect. Most API's won't allow that. You'll need to extract the desired information from two documents and then create one new document based on this information yourself.

这篇关于有没有允许合并docx文件的java库(也许是poi?)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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