Closed Ahury closed 4 months ago
It's work perfectly with only-text PDF File, but there's a problem when it contains image.
the Watermark Text always go under the image like this :
Here is my code :
use FilippoToso\PdfWatermarker\Facades\TextWatermarker; use FilippoToso\PdfWatermarker\Support\Position;
use FilippoToso\PdfWatermarker\Facades\TextWatermarker;
use FilippoToso\PdfWatermarker\Support\Position;
TextWatermarker::input(public_path().'testing.pdf') ->asBackground() ->text($request->textraw) ->angle(25) ->font(public_path().'/font/OpenSans-Regular.ttf') ->size('200') ->color('#CC00007F') ->resolution(300) ->stream('example.pdf');
TextWatermarker::input(public_path().'testing.pdf')
->asBackground()
->text($request->textraw)
->angle(25)
->font(public_path().'/font/OpenSans-Regular.ttf')
->size('200')
->color('#CC00007F')
->resolution(300)
->stream('example.pdf');
any suggestions what's wrong ?
You have told it to place the watermark as background.
It's work perfectly with only-text PDF File, but there's a problem when it contains image.
the Watermark Text always go under the image like this :
Here is my code :
use FilippoToso\PdfWatermarker\Facades\TextWatermarker;
use FilippoToso\PdfWatermarker\Support\Position;
TextWatermarker::input(public_path().'testing.pdf')
->asBackground()
->text($request->textraw)
->angle(25)
->font(public_path().'/font/OpenSans-Regular.ttf')
->size('200')
->color('#CC00007F')
->resolution(300)
->stream('example.pdf');
any suggestions what's wrong ?