How to display a content of MS Word document on a web form?
I was wondering - is there any simple way to show a content of MS Word file on the web page. I'm looking for a more or less cross-browser solution (that is not IE only).
I have already tried a straighforward solution - saving my document as HTML ("Save as" in MS Word) - the result was not what I would consider as acceptable - quite a lot of formating has been lost.
I might consider fixing the conversion results manually if only the resulting html code was simpler. Another reason to reject idea of manually
fixing the conversion results - is the size of the document (which is not small) and the fact that document constantly get updated - thus it would
require that kind of manual intervention more than once.
Here's the list of what I thought might be better solution than the one I have tried:
1. There are some ASP.NET controls able to display content of MS Word document.
2. There might be a better Word -> Html converter.
3. Convert a Word file to some intermediary format (done that with PDF - the results were not really better) and then apply points 1 or 2 to the result of conversion.
Any ideas or suggestions will be greatly appreciated.
Re: How to display a content of MS Word document on a web form?
if i were you i would look at your 3rd option.
You say you attempted to convert this word doc to PDF already but the results were not really better? Are you talking about formatting? because i have used several pdf converteres that do amazing jobs (meaning the formatting is exactly the same) Unfortunately for "developing" many of them are print drivers (ie PDF995.com) just treats itself as another printer, which may be less than ideal if you want to make this a PDF on the fly.
But from experience, generating a PDF from a word doc is a lot easier than stripping content via INTEROP and re-formatting it for the web.
if you look at ripping content from word to display on a page your going to have to format it again (unfortunate)
mcm
Re: How to display a content of MS Word document on a web form?
What versions of Word does it need to support?
If you can limit to Word 2007, it is much easier. The file is nothing more than compressed XML, and well documented. :D
Re: How to display a content of MS Word document on a web form?
Quote:
Originally Posted by TheCPUWizard
What versions of Word does it need to support?
If you can limit to Word 2007, it is much easier. The file is nothing more than compressed XML, and well documented. :D
Smarty thinking =) It's not a problem for me to stick to w2007 only if someone would create the XSL transformation (DOCXML->HTML) for me.
Re: How to display a content of MS Word document on a web form?
Quote:
Originally Posted by mcmcom
if i were you i would look at your 3rd option.
You say you attempted to convert this word doc to PDF already but the results were not really better? Are you talking about formatting? because i have used several pdf converteres that do amazing jobs (meaning the formatting is exactly the same) Unfortunately for "developing" many of them are print drivers (ie PDF995.com) just treats itself as another printer, which may be less than ideal if you want to make this a PDF on the fly.
But from experience, generating a PDF from a word doc is a lot easier than stripping content via INTEROP and re-formatting it for the web.
if you look at ripping content from word to display on a page your going to have to format it again (unfortunate)
mcm
No. What I was trying to say is that I found it is no easier to convert a PDF to HTML compared to converting MS Word Doc to HTML.
MS Word to PDF conversion worked flawlessly and produced pixel perfect - exact conversion - but that was no of real help as I found no simple way to convert PDF to HTML.