views:

16

answers:

2

Hello,

For a project I am working on, I need to convert WordML stream into Word 2002 compatible .doc format (don't ask why - but quite a large group of users are still on Word 2002 with upgrade to latest version not feasible till Q4 2010). I have tried to research a lot of options and have mostly hit a dead end.

My use case is that there is a existing Java-based web service (running on Solaris under Tomcat) which on user's request makes a call to third-party service. This 3rdParty service will return a pdf document and a WordML document. We then need to convert Word ML document to Word 2002 format and our web service updates the page to link to both pdf & word 2002 document which can then be opened by users of web service.

Aspose.Words for Java was my best bet, however it also returned "UnsupportedDocumentFormat" exception for WordML. First I thought it could be my document but all other documents failed too then follow up with Aspose showed despite the documentation, WordML in Java is not supported in current release (http://www.aspose.com/community/forums/248442/wordml-support/showthread.aspx#248442)

I would have gone the route of writing .Net service to do the conversion - but have quiet a few problems there as well - (a) My service [existing] runs on Solaris Box (b) MS doesn't recommends word automation in this way due to poor multithreading performance (c) Use Aspose.Words for .Net - however that means significant Hardware costs + .Net licenses etc.

I explored the possibility finding such possibility for WordML->RTF conversion but did not find suitable library for that either. Apart from the fact that WordML would include some hefty charts which we do not know yet are supported in RTF and we cannot find out either since only WordML is available to us at the moment with Word 2002 installation.

So, it comes to this: Is there any library other than Aspose.Words for Java available to do WordML->Word2002 [or rtf] conversion which does not depend on Windows host doing anything (leave alone actual MS Word installation).

Apologies for long mail, but I really am not able to figure out any option. Any help/suggestion/pointers to suitable library will be very useful. Paid libraries might be okay as long as we have the option to try it out before hand to make case to project sponsor.

Regards, Arun

+1  A: 

You can accomplish your need with Apache POI. It facilitates developers to read and write Microsoft OLE 2 Compound Documents. But it doesn't read or write RTF Documents. You can read from WordML and write as Word 2002 format. Give it a try...

venJava
A: 

docx4j can read 2007 WordML. You could try writing RTF with it, via either FOP or iText (I haven't tried this myself).

plutext