• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Viewing MS Word Docs using a Servlet

 
Majid Al-Fifi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

If your web application needs to view MS Word documents to users in HTML, what is the best practice to do that?

Is there any library that I can use to convert MS Word docs to HTML with similar format as the original Word doc.

Thanks,
Majid
[ May 15, 2007: Message edited by: Majid Al-Fifi ]
 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Do you want to show MS WORD doc to your user?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no general-purpose Word-to-HTML converter. You can try OpenOffice, which has a Java API, and can read Word files and save to HTML.

It's possible to extract the text from a Word document using the Jakarta POI library.
 
rohan sans
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Idea about doc to pdf converter API or Open source software , which is platform independant? other than OpenOffice.
 
Majid Al-Fifi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer,

Do you see jakarta POI library a well established because it's not clear what is the status of the project now.

Is it worth trying in my project in which users will submit MS docs to me and I need to provide them with an interface to view those documents in the explorer as HTML. I don't want to use "Save As HTML" feature of MS Word.

Thanks!
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you see jakarta POI library a well established because it's not clear what is the status of the project now.

It's true that the DOC part of POI is less developed than the XLS part, but there has been some progress in the 3.0 alpha build. If it does what you need done, great, if it doesn't then chances are the missing feature won't be coming soon.

Is it worth trying in my project in which users will submit MS docs to me and I need to provide them with an interface to view those documents in the explorer as HTML.

As mentioned before, POI can extract text from DOC files. If that's sufficient for your purposes I don't see why you wouldn't give it a try.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic