使用 Java 的目录创建 Word/RTF 文件

发布于 2024-07-19 19:23:22 字数 182 浏览 4 评论 0原文

我想从 Java 创建一个包含目录(包含每个部分的链接)的 Word 或 RTF 文件。 据我了解,iText & Apache POI 不支持生成目录。 该应用程序的某些客户端仍然使用旧版本的 Word,因此我需要一个支持旧版 Word 文档格式的库。 有谁知道我该怎么做?

谢谢,

格伦

I want to create a Word or RTF file with a table of contents (with links to each section) from Java. From my understanding, iText & Apache POI do not support generating a table of contents. Some clients of the app still use older versions of Word, so I need a library that supports the older Word doc format. Does anyone know how I can do this?

Thanks,

Glen

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

穿越时光隧道 2024-07-26 19:23:22

查看 OpenOffice 的 Java API。 它会做你想做的事。

Look into the Java API for OpenOffice. It will do what you want.

站稳脚跟 2024-07-26 19:23:22

迟到了,但可能对其他人有帮助。 Docmosis 是一个不错的选择。 它通过 OpenOffice API 运行,但您不必花时间学习该 API。 它提供模板填充和操作、一系列数据源选项以及 OpenOffice 的所有输入和输出选项。 具体来说,它还会在文档渲染的最后阶段更新 TOC 和索引。

Late, but possibly helpful to others. Docmosis is a good option here. It works over the OpenOffice API but you don't have to spend the time learning that API. It provides template population and manipulation, a range of data source options and all the input and output options of OpenOffice. Specifically, it also updates the TOC and indexes at the final stages of document rendering.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文