如何使用mvc在Web浏览器中显示任何文档文件内容 [英] how to show any document file content in web browser using mvc

查看:91
本文介绍了如何使用mvc在Web浏览器中显示任何文档文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用mvc在web浏览器中显示任何文档文件内容



doc,txt,pdf like ..



请帮助!..

how to show any document file content in web browser using mvc

doc ,txt, pdf like..

help please !..

推荐答案

浏览器显示非HTML文件的能力取决于插件或外部应用程序...

例如,Chrome使用自己的插件显示PDF文件,但使用已安装的Office软件包打开Word文档...

因此,根据定义,您无法打开任何文档,因为它可能依赖于客户端计算机上安装的应用程序。

此外,客户端可以配置浏览器以在外部打开文档,即使浏览器具有正确的插件(例如禁用Chrome的内置功能) PDF)...

所以你要求的是不可能的......
The ability of browsers to display file that are not HTML is depends on plugin or external application...
For instance Chrome displays PDF files using its own plugin, but opens Word documents using the installed Office package...
So, by definition you can not open any document as it may be dependent on the installed applications on the client's machine.
Also client can configure browsers to open documents externally even in case browser has the proper plugin (like disabling Chrome's built-in PDF)...
So what you asking for is impossible...


这篇关于如何使用mvc在Web浏览器中显示任何文档文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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