• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically convert Office docs to HTML

 
Amar Samant
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42967
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read its documentation? If so, what are you wondering about in particular?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic