PHP code example of devraeph / laravel-pdf-protect
1. Go to this page and download the library: Download devraeph/laravel-pdf-protect library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
PDFPasswordProtect::setInputFile($inputFile)
...
->setMode("en_GB") //You can set different language values. Default is utf-8
->setFormat("auto|A4|Letter") //You can set a Document format. Default is auto.
->secure();