No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
files
fpdf
fpdi
pdfwatermarker
README.md
index.php

README.md

PDF watermark

Example

require 'pdfwatermarker/pdfwatermark.php';

$watermark = 'files/whatermark.png';    // watermark
$pdf = 'files/1.pdf';                   // input pdf
$savePdf = 'files/2.pdf';               // output pdf

try {
    $watermark = new PDFWatermark($watermark);
    $watermark->setPosition('topright');
    $watermarker = new PDFWatermarker($pdf, $savePdf, $watermark);
    $watermarker->savePdf();
} catch(Exception $e){
    var_dump($e);
}