I'm not aware of a unified API for the two libraries you have mentioned.
However you may still have a couple of options using a single API:
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
Docmosis will do what you require, assuming you mean a Java (or command line) API. It reads doc and odt files as templates, populates/manipulates via the Java API, and produces the output formats OpenOffice supports. Have a look at the online demo on the web site which lets you see various output formats to render a document in.
发布评论
评论(3)
我不知道你提到的两个库有统一的 API。
但是,使用单个 API 时您可能仍然有几个选项:
I'm not aware of a unified API for the two libraries you have mentioned.
However you may still have a couple of options using a single API:
Docmosis 将执行您的要求,假设您指的是 Java(或命令行)API。它将 doc 和 odt 文件读取为模板,通过 Java API 进行填充/操作,并生成 OpenOffice 支持的输出格式。查看网站上的在线演示,它可以让您看到用于渲染文档的各种输出格式。
Docmosis will do what you require, assuming you mean a Java (or command line) API. It reads doc and odt files as templates, populates/manipulates via the Java API, and produces the output formats OpenOffice supports. Have a look at the online demo on the web site which lets you see various output formats to render a document in.
当我从事之前的项目时,我确信 Apache/POI 可以用于 Microsoft 文档。
我们有 IText.jar,我们可以用它来生成和修改 PDF。请检查这会对您有所帮助。
When I was working on previous project, I was sure the Apache/POI can be used for Microsoft Documents.
we have IText.jar which we can use it for PDF generation and alteration. please check this will help you.