Is there a Java API that can create rich Word documents?

I possess a new app I’ll be operating on where I possess to create a Word document that consists of tables, graphs, a dining table of contents and also text. What’s an excellent API to make use of for this?

Some explanations:

I have actually certainly not investigated whether the most recent OpenOffice UNO can easily generate MS-Office 2007 Open XML document formats.

It would certainly behave if I can begin with a template doc and just complete some spaces along with dining tables, charts, and so on

. Many really good responses below, each along with their own negligences regarding my present situation. Challenging to decide on a “finished response” from them. Think I’ll leave it open, and also wish for far better options to be created.

I can’t outcome a PDF, they want a Word doc.
They’re using MS Word 2003 (or 2007), certainly not OpenOffice
Application is running on * nix app-server

I applied this API named Java2Word. along with a few lines of code, you can easily create one Microsoft Word Document.

It was actually pointed out only temporarily the moment, so I would love to call out the docx4j collection, as I’ve possessed extra results with docx4j than just about anything else. Apache POI’s support for Word documents isn’t terrific. Additionally, unlike Aspose.Words, docx4j is an available source collection.

There’s a tool contacted JODConverter which fastens into available office to expose it’s data style converters, there is actually versions readily available as a webapp (beings in tomcat) which you post to and also an order line resource. I have actually been actually firing html at it as well as transforming to.doc and also pdf succesfully it remains in a rather major task, haven’t gone real-time yet however I assume I’m mosting likely to be using it.

The only setback is along with docx4j you need to produce Office Open XML (docx) layout documents rather than OLE2-based (doc) style documents. This is the nonpayment style for Word 2007, yet Word 2003 and also earlier customers will certainly need to put up a being compatible pack.

I think Apache POI can do the job. A feasible trouble depending on the consumption your aiming to may be actually caused by the fact that HWPF is actually still in early progression.

Our team streamlined the procedure by utilizing theme MS-Word documents along with save inserts into which the software application inserted content, nonetheless, you can build documents totally from square one. The target was to possess the software program produce document documents that might be discussed and also more fine-tuned by end-users just before turning all of them to PDF for last delivery as well as archival.

Despite the fact that this is actually a lot beyond the ask for, it may help others. Docmosis delivers a Java API for generating documents in doc, pdf, odt layout making use of documents as templates. It utilizes OpenOffice as the motor to conduct the style conversions. Document control and also population is actually carried out through Docmosis itself.

Utilizing this API you may generate a document from the ground up, practically from nodules as well as establish their format properties. You can easily likewise utilize a DocumentBuilder which gives greater amount techniques such as create a table row, place an area etc. Or you can easily copy/join/move portions between existing pre created document, say you intend to set up an arrangement, just get hold of as well as duplicate items from many documents and also Aspose.Words are going to merge designs, listing formatting etc adequately in the leading document.

If you really want consumers to utilize OpenOffice rather of MS-Office, you can additionally produce documents in OpenOffice styles. In our case the consumers want to use MS-Office tools.

The OpenOffice UNO job carries out appear to be closest to what I asked for. While POI is actually absolutely a lot more mainstream, it is actually as well immature for what I prefer.

These do simply work in Word 2007 or even above – but all you require is actually Microsoft’s white colored study that explain what each tag performs. You may achieve all you wish with the tags the same means as if you were utilizing Word (of training program a bit a lot more unpleasant initially.).

OpenOffice UNO additionally permits you develop MS-Office-compatible graphes, spread sheets, discussions, and so on. We were able to dynamically develop innovative Word documents, including dining tables as well as charts.

You can use this:

UNO is actually featured within the OpenOffice set. Our team merely connected our Java app to UNO-related public libraries within the set. An OpenOffice Program Development Package (SDK) is readily available having instance applications and the UNO Programmer’s Quick guide.

Leave a Reply

Your email address will not be published. Required fields are marked *