首页
开发手册
应用中心
工具
用户中心
FoundPHP PDFCustom Settings and PDF File Encryption
English
中文简体
English
上一篇
下一篇
FoundPHPPDF provides a fast and simple PDF application, we optimize and streamline the operation to deal with various complex functions, and provide convenient settings at the same time. #### PDF ConfigFile Configuration The configuration file involves copyright, author, description, keywords, and password settings for encrypted files. config.php ```php ``` Correspondingly add copyright information to the PDF file: ![](data/files/edit/20/03/19/200319_17031308.jpg) ------------
#### Header Description If head() is not called, there is no page header. method:head() ```php head(array( 'logo'=>'logo.png', //logo 'size'=>25, //size 'text'=>'FoundPHP Framework', //word description 'intro'=>'FoundPHP It is the simplest MVC box in the world', //word description 'color'=> '#666666' //text color )); ?> ``` realize the effect: ![](data/files/edit/20/03/19/200319_16358276.jpg) ------------
#### Footer Description In the footer method, foot provides display and hide settings. When setting the background image page, try to reserve the footer position, otherwise the covering will affect the content. At this time, you can use the hide footer function. method:foot() ```php foot(); //footer hidden $pdf->foot(1); ?> ``` realize the effect: ![](data/files/edit/20/03/19/200319_16362356.jpg) ------------
#### File Storage Instructions You only need to set the file name to save the PDF, no suffix is required. If you need to make a storage directory, you need to set it after the file name. method:s() ```php s('test'); //specify directory storage $path = 'data/pdf/'; //check if the directory exists if(!is_dir($path)){ //create a directory without a directory $tpl->mk_dir($path); } //write file $pdf->s('save_pdf',$path); ?> ```
#### File Display/Download Instructions The method of fast display and download can be realized with a simple call. method:p() ```php p('foundphp_pdf',0); //to download the file in the browser, specify the name of the downloaded file in the method. $pdf->p('foundphp_pdf',1); ?> ```