I have a tough project in my pipeline and I'm not sure where to begin. My boss wants the ability to display a Word Document in HTML and it look the same as the word document.
After trying time after time to just let me show the word document in a pop up or a light box he is stuck on stripping out the contents of the word converting it to HTML saving that in a database and then displaying it as HTML on a webpage.
Can you guys either give me some good ammo as to if showing the word document is better (less cumbersome, less storage space more secure etc).
Or if it's pretty easy to convert a word document to HTML ways for me to do that.
The technologies I current have are Entity Framework, LINQ, MVC, C#, Razor.
We currently use HTmlAgilityPack, but this strips out all of the formatting and doesn't allow the document to show very well.
We use http://www.aspose.com/ (I think the one we use is Aspose words) to perform s similar task, and it works quite well. (there is a cost involved)
I would suggest that converting to HTML gives the worst rendition of the document. One solution we use, is to generate a Jpeg image of the document and display that.
If you need to be able to perform operations like find and copy/pasting text - I would recommend converting the document to a .pdf, and displaying it inline, in whichever standard pdf viewer the client machine has installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With