This article will introduce to you how to use php to generate pdf files, and encrypt the files or set access passwords, if necessary Friends can refer to it.
Project requirements: PHP generates pdf files, and encrypts the files or sets access passwords
The open source TCPDF is a set of class libraries based on PHP, which can generate documents in PDF format very well. It also supports file encryption and is widely used in current open source PHP frameworks, systems, and applications. Here is the method prototype for setting the relevant properties of a PDF document, in which you can set a password
?
2 3
|
TCPDF::SetProtection
(
$permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), |