FPDI/FPDF: Watermark and Print Multiple Pages
问题 I modified this stack question: Applying watermarks on pdf files when users try to download the files but I encountered an error, though there was a comment that says on how to fix it, it wasn't elaborate enough. Here is the code: require_once('fpdf/fpdf.php'); require_once('fpdi/fpdi.php'); class WaterMark { public $pdf, $file, $newFile, $wmText = "STACKOVERFLOW"; /** $file and $newFile have to include the full path. */ public function __construct($file, $newFile) { $this->pdf = new FPDI();