filippotoso / pdf-watermarker

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

Watermark Overlay on Image #11

Closed Ahury closed 4 months ago

Ahury commented 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 :

Screenshot Watermark

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 ?

filippotoso commented 4 months ago

You have told it to place the watermark as background.

->asBackground()