转换Word为HTML然后渲染网页上的HTML [英] Convert Word to HTML then render HTML on webpage

查看:1164
本文介绍了转换Word为HTML然后渲染网页上的HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在管道艰难的项目,我不知道从哪里开始。我的老板要在HTML中显示Word文档,它看起来一样的word文档的能力。

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.

试图一次又一次只是让我给Word文档后,在弹出或灯箱他被困在剥出字变换它的内容为HTML保存在数据库中,然后显示它作为HTML网页上。

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.

你们既可以给我一些很好的弹药来,如果显示Word文档是更好的(那么繁琐,更少的存储空间,更安全等)。

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).

或者,如果它很容易将Word文档转换为HTML的方式为我做到这一点。

Or if it's pretty easy to convert a word document to HTML ways for me to do that.

这些技术我目前拥有的实体框架,LINQ,MVC,C#,剃刀。

The technologies I current have are Entity Framework, LINQ, MVC, C#, Razor.

我们目前使用HTmlAgilityPack,但这剔除所有格式,并且不允许文件显示得非常好。

We currently use HTmlAgilityPack, but this strips out all of the formatting and doesn't allow the document to show very well.

推荐答案

我们使用 http://www.aspose.com/ (我认为我们使用的是阅读Aspose字)进行S类似的任务,它工作得很好。 (这牵涉到成本)

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)

我建议转换为HTML给出文档的最坏再现。
,我们使用一种解决方案,是生成该文件的JPEG图像,并显示。

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.

如果您需要能够像找到并复制执行操作/粘贴文本 - 我会建议将文档转换为.pdf,和内联显示它在任何标准的PDF阅读器客户端计算机安装了

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.

这篇关于转换Word为HTML然后渲染网页上的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆