PHP generates PDF files and encrypts
This article is to introduce how to use PHP to generate PDF files, and the file encryption or set access password method, the need for small partners to refer to.
Project requirements: PHP generates a PDF file and encrypts or sets the access password for the file
The open source tcpdf is a PHP-based class library that is able to produce PDF documents in a very good format. and support file encryption, in the current open source PHP framework, systems, applications are also widely used. Here is a method prototype that sets the relevant properties of the PDF document, where you can set the password
?
1 2 3 4 5 6 7 8 |
Tcpdf::setprotection ( $permissions = Array (' print ', ' modify ', ' Copy ', ' annot-forms ', ' fill-forms ', ' extract ', ' assemble ', ' Print-high '), $user _pass = ", $owner _pass = null, $mode = 0, $pubkeys = null ) |
After the Setprotection () method is set, the resulting PDF document is encrypted, and the user is asked to enter the access password when the PDF document is opened.
http://www.bkjia.com/PHPjc/1020280.html www.bkjia.com true http://www.bkjia.com/PHPjc/1020280.html techarticle PHP generate PDF file and encrypt this article is to introduce how to use PHP to generate PDF files, and the file to encrypt or set the way to access the password, the need for small partners can participate ...