Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change watermark color? #124

Closed
abdulbasit-dev opened this issue May 10, 2023 · 2 comments
Closed

how to change watermark color? #124

abdulbasit-dev opened this issue May 10, 2023 · 2 comments

Comments

@abdulbasit-dev
Copy link

 this my code
 i tried to use watermark_color but it not work
 
    $data = [
        "no_of_rooms" => 4,
        "area" => 200,
        "price" => 2000,
    ];

    $pdf = PDF::loadView('pdf.contract', $data, [], [
        'watermark'                => 'مجمع كرستال ستي السكني',
        'show_watermark'           => true,
        "watermark_font"           => "DejaVuSansCondensed",
        "watermark_text_alpha"     => 0.2,
        'watermark_color'          => '#4F81BD',
    ]);

    return $pdf->stream('contract.pdf');
@sdon2
Copy link
Contributor

sdon2 commented May 25, 2023

I think there is no option to set watermark color in underlying mPDF library.
Refer: https://mpdf.github.io/what-else-can-i-do/watermarks.html

Issue is already raised in mPDF repository: mpdf/mpdf#1866

@abdulbasit-dev
Copy link
Author

thank u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants