如何用c#在asp.net中打开pdf readonly选项? [英] How to open pdf readonly option in asp.net with c#?

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

问题描述





在我的项目中,我在项目文件夹中添加了pdf文件,然后在Hyper链接中引用了这个pdf文件。当我点击pdf超链接时,应该打开同一页面,只读取选项(不允许下载,也可以在pdf文件中保存到驱动器副本)。





如果有人知道这个PLZ帮助我。



先谢谢

Hi,

In my projects I have added pdf file in project folder then Referenced this pdf file in Hyper link. When I click the pdf hyperlink, it should be open same page with read only option(Don't allow download,save to drive copy also in pdf file).


If any knows for this plz help me.

Thanks in Advance

推荐答案

PDF只读与不允许下载无关。 PDF主要是只读的,但可以使用可以填写和保存的表格。



对于不允许下载,有原则上没有这样的事情。如果您有PDF超链接,则始终可以将资源下载为本地文件。此外,如果您可以在自己的页面上看到PDF,已经下载了。即使你发明了一些限制,任何有经验的用户都可以直接下载资源。



另外,你需要明白:即使你的不允许下载 解决方案是可行的,这将是一个非常糟糕的违反基本用户权利,完全滥用。你不应该这样想。谁会容忍并同意与这样做的网站合作?



还有其他一些你需要知道的事情。 PDF不是任何W3标准的一部分。不仅您不能假设PDF可以在网页上呈现,您不能假设客户端系统有任何PDF阅读器或其他PDF感知应用程序一点都不在我正在使用的两个系统中,我删除了所有PDF工具,但暂时没有。因此,即使这种情况相对罕见,也始终如此。您可以依赖的唯一可能是您要限制的内容 - 保存文档。



-SA
PDF read-only has nothing to do with "don't allow download". PDF is primarily read-only, but it can be with forms which can be filled in and saved.

As to "don't allow to download", there is no such thing in principle. If you have working PDF hyperlink, you can always download the resource as a local file. Moreover, if you can see the PDF rendered on your own page, it is already downloaded. And even if you invent some limitations, any experienced user can always download the resource directly.

Also, you need to understand: even if your "don't allow download" solution was feasible, it would be a very bad violation of elementary users rights, a total abuse. You just should not want to go this way. Who would tolerate and agree to work with site which would behave this way?

There is something else you need to know. PDF is not a part of any W3 standard. Not only you cannot assume that the PDF can be rendered on a Web page, you cannot assume that the client system has any PDF reader or other PDF-aware application at all. On two of the systems I'm using I removed all PDF tools and did not have any for a while. So, even this is relatively rare, it can always be the case. The only possibility you can rely on is what you want to limit — saving the document.

—SA

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

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