使用相同的API编写Word和PDF文档 [英] Using the same API to write both Word and PDF documents
本文介绍了使用相同的API编写Word和PDF文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
在Apache POI /
is there any kind of abstraction API over Apache POI/FOP allowing one to use the same API to write both Word and PDF documents ?
推荐答案
我不知道您提到的两个库的统一API.
I'm not aware of a unified API for the two libraries you have mentioned.
但是,使用单个API可能仍然有一些选择:
However you may still have a couple of options using a single API:
- 使用Apache POI生成Word格式的文档,然后使用Word至PDF转换库从Word文档创建PDF.另一位评论者建议 IText
- 通过Java API使用 OpenOffice 来创建文档并导出它们为Microsoft Word或PDF格式.
- Use Apache POI to generate the documents in Word format and then use a Word to PDF conversion library to create a PDF from the word document. Another commenter has suggested IText
- Use OpenOffice via its Java API to create documents and export them in Microsoft Word or PDF format.
这篇关于使用相同的API编写Word和PDF文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文