简体   繁体   English

PHP PDF密码保护(无密码不可打开)

[英]PHP PDF password protection (no open without password)

I got a php / javascript based web application that sends created PDF files via E-Mail.我有一个基于 php/javascript 的 Web 应用程序,它通过电子邮件发送创建的 PDF 文件。 This PDF files should be password protected from opening so that no one can open this files without the password.此 PDF 文件应受密码保护以防止打开,以便没有密码任何人都无法打开此文件。 tcpdf & fpdf are not the right ways (because everyone could open the PDF but not modify or not copy or not print) tcpdffpdf是不正确的方式(因为每个人都可以打开PDF,但不能修改或不得复制或不能打印)

anyone got an idea?有人有想法吗?

FPDF (+ FPDF_Protection ) and also TCPDF will work. FPDF (+ FPDF_Protection ) 和 TCPDF 也可以工作。 You will have to pass BOTH user AND owner password to the setProtection() method.您必须将用户和所有者密码都传递给 setProtection() 方法。 If you leave one as an empty string the viewer application is able to authenticate with this "empty string-password" automatically.如果您将其保留为空字符串,则查看器应用程序能够自动使用此“空字符串密码”进行身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM