[英]How to protect a PDF with a username and password?
I think this is a bit complicated and probably impossible, but it would be helpful to know if there is any way to do it... 我认为这有点复杂并且可能是不可能的,但是了解是否有任何方法可以这样做……
Let's say I have a private teaching forum, where each user (paid account) has a username and an encrypted password, and there's a DOWNLOAD section where pdf files can be downloaded by users only. 假设我有一个私人教学论坛,其中每个用户(付费帐户)都有一个用户名和一个加密密码,还有一个“下载”部分,其中pdf文件只能由用户下载。
Here's the question: When the file is downloaded, it will be protected by username and password/ password only that match with the username and password of the user himself... in other words, the password is taken from the user's account and added to the pdf file, then a download link is generated for that file. 问题是:下载文件时,该文件将仅受与用户本人的用户名和密码匹配的用户名和密码/密码保护...换句话说,该密码是从用户帐户中获取并添加到pdf文件,然后为该文件生成下载链接。
This way, copying the pdf file to others would force the "copier" to give out his username and password... 这样,将pdf文件复制给其他人将迫使“复印机”提供他的用户名和密码...
EDIT : the password is for OPENING the file not editing or printing it, I want users to be able to highlight the text and add their own notes 编辑 :密码用于打开文件而不是编辑或打印文件,我希望用户能够突出显示文本并添加自己的注释
You can't achieve what you want with PDF. 使用PDF无法实现所需的功能。
There are two ways to encrypt a PDF document: 有两种方法来加密PDF文档:
Neither of both cases serve your purpose (read ISO-32000-1 for the full details). 两种情况都不符合您的目的(有关详细信息,请阅读ISO-32000-1)。 The only alternative is to buy an expensive DRM solution.
唯一的选择是购买昂贵的DRM解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.