This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Viewing MS Word Docs using a Servlet  RSS feed

 
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 ]
 
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?
 
Rancher
Posts: 42974
76
  • 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.
 
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: 42974
76
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!