在 Java 中以编程方式将 Word 文档转换为 HTML [英] Convert Word doc to HTML programmatically in Java

查看:32
本文介绍了在 Java 中以编程方式将 Word 文档转换为 HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用 Java 将 Word 文档转换为 HTML 文件.该函数将输入一个 word 文档,输出将是基于 word 文档页数的 html 文件,即如果 word 文档有 3 页,那么将生成 3 个具有所需分页符的 html 文件.

I need to convert a Word document into HTML file(s) in Java. The function will take input an word document and the output will be html file(s) based on the number of pages the word document has i.e. if the word document has 3 pages then there will be 3 html files generated having the required page break.

我搜索了可以将 doc 转换为 html 但没有结果的开源/非商业 API.任何以前做过此类工作的人请帮忙.

I searched for open source/non-commercial APIs which can convert doc to html but for no result. Anybody who have done this type of job before please help.

谢谢

推荐答案

我们使用 tm-extractors (http://mvnrepository.com/artifact/org.textmining/tm-extractors),并退回到商业 Aspose(http://www.aspose.com/).两者都有原生 Java API.

We use tm-extractors (http://mvnrepository.com/artifact/org.textmining/tm-extractors), and fall back to the commercial Aspose (http://www.aspose.com/). Both have native Java APIs.

这篇关于在 Java 中以编程方式将 Word 文档转换为 HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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