Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.15.229.217
<?php
function pdfEncrypt ($origFile, $password, $destFile)
{
require_once("fpdi/FPDI_Protection.php");
$pdf =& new FPDI_Protection();
$pdf->FPDF();
$pagecount = $pdf->setSourceFile($origFile);
for ($loop = 1; $loop <= $pagecount; $loop++)
{
$tplidx = $pdf->importPage($loop);
$pdf->addPage();
$pdf->useTemplate($tplidx);
}
$pdf->SetProtection(array(), $password);
$pdf->Output($destFile,"D");
return $destFile;
}
?>
|