mPDF Manual – mPDF Variables

watermarkImageAlpha

(mPDF ≥ 2.2)

Description

string watermarkTextAlpha

Specifies the transparency (alpha value) to use for the watermark text on each page.

Values

$watermarkTextAlpha

  • Define as a value between 0 and 1.
  • BLANK is default value.

Default: 0.2

Examples

Example #1

<?php
$mpdf = new \Mpdf\Mpdf();

$mpdf->SetWatermarkImage('images/logo.jpg');
$mpdf->showWatermarkImage = true;
$mpdf->watermarkImageAlpha = 0.1;

$mpdf->WriteHTML('
Hello World
');

See Also

Fork me on GitHub