• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Viewing MS Word Docs using a Servlet

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Do you want to show MS WORD doc to your user?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic