在asp.net中禁用打印并保存为pdf文件的选项 [英] disable print and save as option of pdf file in asp.net

查看:228
本文介绍了在asp.net中禁用打印并保存为pdf文件的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我要在浏览器中查看pdf文件,但它不会保存为该pdf文件的选项和打印选项。那么如何在asp.net中禁用pdf文件的保存和打印选项。

Hi All,

I am having pdf file to view in browser but it will not having save as option and print option for that pdf file . So how to disable save as and print option of pdf file in asp.net.

推荐答案

菜单项另存为...和打印...属于浏览器,而不是您的Web应用程序;你无法禁用它们。即使你在一个浏览器中使用某些技巧来禁用它们,它们也将在另一个浏览器中启用。考虑一下,如果禁用是可能的,它会残酷地侵犯用户的一些非常基本的权利。从技术上讲,如果某个页面在浏览器上呈现,它已经完全在客户端,因此用户总能找到一种方式以她/他想要的方式使用它。



还有别的吗?哦,当然:不要做坏事。



-SA
The menu items "Save As…" and "Print…" belong to a browser, not to your Web application; you cannot disable them. Even if you use some trick to disable them in one browser, they will be enabled in other one. Come to think about, if disabling was possible, it would brutally violate some very basic rights of your users. Technically, if some page is rendered on the browser, it is already fully on the client side, so the user can always find a way to use it the way she/he wants.

Anything else? Oh, sure: don't do evil.

—SA


这篇关于在asp.net中禁用打印并保存为pdf文件的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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