Applying watermarks on pdf files when users try to download the files

后端 未结 4 723
悲哀的现实
悲哀的现实 2020-12-28 21:46

The solutions for my school\'s assignments all have waterstamps on the PDFs with our username on it.

I was wondering if you guys know how to do something like that u

4条回答
  •  独厮守ぢ
    2020-12-28 22:24

    Here are the steps that I tried with water marking using fpdi:

    setSourceFile($file);
        } else {
            return FALSE;
        }
    for($i=1; $i <= $pagecount; $i++) { 
         $tpl = $pdf->importPage($i);               
         $pdf->addPage(); 
         $pdf->useTemplate($tpl, 5, 5);
    $pdf->Image($imageURL, $xxx, $yyy,'png');
    }
    
    
        if ($outdir === TRUE){
            return $pdf->Output($file,'I');
        } else {
            return $pdf->Output();
        }
    }
    $images='https://www.office-deals.nl/images/logo_60x37.png';
    PlaceWatermark("laravel.pdf", $images, 180, 275, 100,TRUE);
    ?>
    

提交回复
热议问题