$pdf = new Pdf($source_pdf);$watermark = new TextWatermark('watermark kuy', $font, 120, 40, '#660000' );
$watermarker = new PDFWatermarker($pdf, $watermark);$position = new Position(Position::TOP_CENTER, -20, 40);$watermarker->setPosition($position);$watermarker->setAsBackground();$watermarker->save($output);
the resulting watermark text does not appear in the output file
use FilippoToso\PdfWatermarker\Support\Pdf;
use FilippoToso\PdfWatermarker\Watermarks\ImageWatermark;
use FilippoToso\PdfWatermarker\Watermarks\TextWatermark;
use FilippoToso\PdfWatermarker\PdfWatermarker;
use FilippoToso\PdfWatermarker\Support\Position;
$source_pdf = storage_path('app/sample.pdf');
$font = storage_path('app/verdana.ttf');
$output = storage_path('app/result.pdf');
$pdf = new Pdf($source_pdf);
$watermark = new TextWatermark('watermark kuy', $font, 120, 40, '#660000' );
$watermarker = new PDFWatermarker($pdf, $watermark);
$position = new Position(Position::TOP_CENTER, -20, 40);
$watermarker->setPosition($position);
$watermarker->setAsBackground();
$watermarker->save($output);
the resulting watermark text does not appear in the output file