mPDF Manual – mPDF classes

\Mpdf\WatermarkText

(mPDF ≥ 8.2.0)

\Mpdf\WatermarkText()

Description

\Mpdf\WatermarkText ( string $text [, int $size [, int $angle [, mixed $color [, float $alpha [, string $font ]]]]])

Parameters

$text

Text of the watermark.

$size

Size of text.

$angle

Angle of the watermark.

$color

Color definition of the watermark. Can be any color definition mPDF recognizes.

$alpha

Alpha of the watermark, values 0-1. 0 = fully visible, 1 = transparent.

$font

Font name.

Examples

Example #1

<?php
$mpdf->SetWatermarkText(new \Mpdf\WatermarkText('Watermark text', 100, 90, '#996633', 0.4));

Fork me on GitHub