PHP generates PDF format files and encrypts them, _PHP tutorial

WBOY
Release: 2016-07-13 09:49:05
Original
949 people have browsed it

php generates a PDF file and encrypts it,

Project requirements: php generates a pdf file, and encrypts the file or sets an access password

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

TCPDF::SetProtection 
(
$permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), 
$user_pass = '', 
$owner_pass = null, 
$mode = 0, 
$pubkeys = null 
)

Copy after login

After setting through the SetProtection() method, the generated PDF document is encrypted, and the user will be asked to enter the access password when opening the PDF document

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1020539.htmlTechArticlephp generates PDF format files and encrypts them. Project requirements: php generates pdf files and encrypts the files or sets access Cipher's open source TCPDF is a set of class libraries based on PHP, which can...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template