I use FPDI without composer so my file looks like this:
...
use \setasign\Fpdi;
require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/fpdi2/src/autoload.php');
// initiate FPDI
$pdf = new Fpdi\Fpdi();
...
I would like to add FPDI Protection to protect the PDFs I just generated
But on their readme, it shows only the procedure to follow if one uses composer
use setasign\FpdiProtection\FpdiProtection;
// setup the autoload function
require_once('vendor/autoload.php');
$pdf = new FpdiProtection();
$ownerPassword = $pdf->setProtection(
FpdiProtection::PERM_PRINT | FpdiProtection::PERM_COPY,
'the user password',
'the owner password'
);
How to make FPDI uninitialized with FPDI Protection? I do not understand how to do ..