使用异步可插拔协议在 IE 中显示文件
我为 Internet Explorer 创建了一个异步可插拔协议:
ex://D:/sample.html (假设“ex”是我创建的协议)
在 IE 本身中打开文件 D:/sample.html 文件
以下是问题:
它能够渲染 html 和 jpeg(尚未检查其他图像文件格式)文件。但对于其他文件格式(例如 .doc、.pdf、.swf 等),它会显示错误“导航到网页已取消”。根据我记录处理阶段的日志,整个处理过程与这些文件格式如 html 等。
在 IE 中打开文件后,将使用系统中为该文件格式注册的默认应用程序在 IE 中打开该文件。例如:在 adobe reader 是为 pdf 文件格式注册的默认应用程序的系统中,在 adobe reader 中打开 pdf 文件。那么有什么方法可以在显示文档时以编程方式控制该默认应用程序的 UI 控件(例如保存、打印等)。
任何指示都会有帮助。谢谢。
I have created an asynchronous pluggable protocol for Internet Explorer :
ex://D:/sample.html (assume "ex" to be the protocol created by me)
opens the file D:/sample.html file in the IE itself
Following are the issues:
Its able to render html and jpeg(havn't checked other image file formats) files. But it displays the error "Navigation to the webpage was canceled" for other file formats such as .doc, .pdf, .swf, etc. According to the logs where I am recording stages of processing, the entire processing is going on similarly for these file formats as in the case of html etc.
After we open a file in IE, the file is opened in the IE using the default application being registered for the file format in the system. For example: a pdf file is opened in adobe reader in systems where adobe reader is the default application registered for pdf file format. So is there any way we can control UI controls(such as save, print,etc) of that default application programatically while the document is being displayed.
Any pointers would be helpful. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看我的测试协议:(tp://) on codeplex。它确实通过报告 MIME 类型来处理各种类型。
Take a look at my test protocol: (tp://) on codeplex. It does handle various types by reporting MIME type.