good day, can someone help me, how to add a watermark text in a scanned pdf file
ADD watermark in my PDF file
Hi, can someone help me solve my problem? I have a upload blade file for PDF when i uploading a PDF file to add a watermark its work but when tried to upload converted PDF its not working. The file im trying to upload was from image converted to pdf. Im using TCPDF and i also tried Fpdi and a lot more but i cannot solve it this was my controller $pdf = new Fpdi(); $pageCount = $pdf->setSourceFile($originalPdfPath); $watermarkUrl = public_path('uploads/a4_size.png'); for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) { $pdf->AddPage(); $templateId = $pdf->importPage($pageNo); $pdf->useTemplate($templateId); $pdf->Image($watermarkUrl, 50, 50, 100, 100, 'PNG', '', '', false, 300, '', false, false, 0, 'C', false, false); }
// Save the watermarked PDF
$watermarkedFilePath = $destinationPath . '/' . $fileNameWatermarked;
$pdf->Output($watermarkedFilePath, 'F');
Thank you in advance
Please or to participate in this conversation.