如何在c#中禁用pdf文件的下载选项? [英] How to disable download option of pdf file in c# ?

查看:450
本文介绍了如何在c#中禁用pdf文件的下载选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁用pdf工具栏,因为我不想将下载选项提供给pdf查看器。

How to disable the pdf Toolbar because I don't want to give the download option to the pdf viewers.

我使用Iframe显示Pdf文件请找以下代码

I have used Iframe for showing Pdf File please find the following code

<iframe ID="iFrame2" runat="server" align="bottom" frameborder="2" name="iframe1" height="500" width="600" src="~/pdffiles/example.pdf"></iframe>

请帮我用c#禁用下载选项。

Please help me to disable the download option using c#.

谢谢

推荐答案

你不能。这是一个浏览器功能,这意味着您无法控制它。
您可以使用第三方工具,例如 Google文档查看器,或者将文档格式更改为图像。

You cant. It is a browser feature which means you have no control over it. You can use third party tools like Google Document Viewer or change the format of your document to an image.

Google Document Viewer

这篇关于如何在c#中禁用pdf文件的下载选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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