Display word in html..Pls help..
Hi,
I am trying to show the content of a word document or a pdf file into my html page. Can someone help me out in doing this.. If there is any code snippet for that can someone share it for me... It should not prompt for open or save, instead it has to show the contents in my web page.. Please help me out.. Thanks in advacne...
Re: Display word in html..Pls help..
There are different ways to do this and it depends on two things, one that you can control, one you cannot:
- You need to make sure you're setting the proper MIME type on the response, ie application/xls, application/pdf, etc.
- This is the part you can't control directly - the client must have something capable of reading this data, such as a plugin / etc. If they don't have the plugin, the default behavior of a browser is to treat it as binary and save it to disk. The only other option is to actually parse the file and turn it into HTML (ie, what google does with attachments in GMail.) This usually doesn't work too well and has a lot of conversion problems.
Re: Display word in html..Pls help..
HTML Code:
<meta http-equiv="Content-Type" content="application/msword; charset=iso-8859-1" />
But if you wanted all the MSWord controls, forget about it. You would need to integrate a js controls for this instead.