pdf watermark dengan laravel

Solutions on MaxInterview for pdf watermark dengan laravel by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "pdf watermark dengan laravel"
Pete
10 May 2020
1<?php
2
3//Specify path to image. The image must have a 96 DPI resolution.
4$watermark = new PDFWatermark('C:\myimage.png'); 
5
6//Set the position
7$watermark->setPosition('bottomleft');
8
9//Place watermark behind original PDF content. Default behavior places it over the content.
10$watermark->setAsBackground();
11
12//Specify the path to the existing pdf, the path to the new pdf file, and the watermark object
13$watermarker = new PDFWatermarker('C:\test.pdf','C:\output.pdf',$watermark); 
14
15//Set page range. Use 1-based index.
16$watermarker->setPageRange(1,5);
17 
18//Save the new PDF to its specified location
19$watermarker->savePdf(); 
20?>