如何禁用打印和下载浏览器功能 [英] How to disable Print and Download browser function

查看:107
本文介绍了如何禁用打印和下载浏览器功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在asp.net c#中的浏览器中以只读方式打开PDF。



当在Chrome中打开pdf它显示标签供下载和打印时,我删除Chrome中的这个标签我也想要pdf无法在浏览器中的任何浏览器中打印和下载。



如何在asp.net C#中做?

请帮帮我...

I want to open PDF read-only in browser in asp.net c#.

when open pdf in chrome it display tag for download and print, I remove this tab in chrome and also i want pdf can't print and download in any browser only view in browser.

How can i do in asp.net C#?
Please help me...

推荐答案

几乎不可能。干净利落。您可以阻止右键单击,但没有任何东西可以阻止知识渊博的用户使用开发人员工具并直接查看您的链接。

或者查找下载文件以供查看时创建的临时文件。

至少,您无法阻止用户制作屏幕截图并单独保存每个页面。 />


您可以使用下载它的javascript来屏蔽链接,但每当您显示公开内容时,您应该已准备好下载它。



您可以使用某种DRM来阻止下载PDF的用户使用它。



见这里 [ ^ ]



您可以将其更改为闪存,有办法解决这也是一件事,但也让它变得更难。



另外,如果你打扰google阻止pdf文件被保存,你会看到以上所有内容。





如果这有帮助,请带t我接受解决方案。谢谢。
Almost impossible. Plain and simple. You can prevent right click, but nothing can prevent knowledgeable user from using developer tools and looking directly at your link.
Or look for temporary file created when the file was downloaded for viewing.
At the very least, you cannot prevent users from making screenshots and save each page individually.

You can have javascript that downloads it to mask the link, but whenever you show something public you should be ready for it to be downloaded.

You can use some kind of DRM to prevent users who do download your PDF from using it.

See here [^]

You could change it to flash, there are ways around that too, but makes it harder.

Also, if you bothered to google "prevent pdf file from being saved" you would see all of the above.


If this helps, please take time to accept the solution. Thank you.


这篇关于如何禁用打印和下载浏览器功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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