• 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

Dynamically convert Office docs to HTML

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When i upload any office file, pdf document, i want to use the feature "View as HTML" while viewing the uploaded file(similar to the feature in GMAIL when we can view our attachments as HTML ). Can this be done using javascript?.

searching on net i think if the docs are converted to XML then they can be viewed as HTML via XSTL. but i dont know how to do this. Main problem here is i want to achieve the whole thing dynamically.

Waiting for your suggestions and replies. Thanks in advance
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's tricky. One option might be to run OpenOffice in server mode (without a GUI), and have it open the file in question and save it to HTML. Then you display the HTML file in whichever way is convenient. The JODConverter library simplifies this a lot.
 
Amar Samant
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. But i want to achieve this whole thing dynamically on click of the link. If i save the document as an ".mhtm" then i can get the document in web format but not dynamically,here i have to save the document as ".mhtm" using Office. This has to be done manually. Can i get to know how this "Save as .mhtm" works internally (i.e the source code) so that i can try the same code dynamically.
 
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
I don't know what ".mhtm" is or does, but what I outlined before works programmatically, not manually as you seem to assume. The documentation of the JODCOnverter library talks about it in more detail.
 
Amar Samant
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Ulf for getting it wrong.

I have no idea about JODConverter can you please explain in detail.
Thanks for your reply. Please help me out here.
 
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
Have you read its documentation? If so, what are you wondering about in particular?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic