filippotoso / pdf-watermarker

Simple PDF Watermarker with Laravel support
Other
6 stars 7 forks source link

Fatal error: Uncaught Error: Class 'Watermark' not found #2

Closed APTEMOH closed 1 year ago

APTEMOH commented 1 year ago

Fatal error: Uncaught Error: Class 'Watermark' not found

APTEMOH commented 1 year ago

use FilippoToso\PdfWatermarker\Support\Pdf; use FilippoToso\PdfWatermarker\Support\ImageWatermark; use FilippoToso\PdfWatermarker\PdfWatermarker;

// Specify path to the existing pdf $pdf = new Pdf('input.pdf');

// Specify path to image. The image must have a 96 DPI resolution. $watermark = new Watermark('watermark.png');

// Create a new watermarker $watermarker = new PDFWatermarker($pdf, $watermark);

// Save the new PDF to its specified location $watermarker->save('output.pdf');

filippotoso commented 1 year ago
use FilippoToso\PdfWatermarker\Support\Pdf;
use FilippoToso\PdfWatermarker\Watermarks\ImageWatermark;
use FilippoToso\PdfWatermarker\PdfWatermarker;

// Specify path to the existing pdf
$pdf = new Pdf('input.pdf');

// Specify path to image. The image must have a 96 DPI resolution.
$watermark = new ImageWatermark('watermark.png'); 

// Create a new watermarker
$watermarker = new PDFWatermarker($pdf, $watermark); 

// Save the new PDF to its specified location
$watermarker->save('output.pdf');