mPDF Manual – mPDF Variables

watermark_font

(mPDF ≥ 1.0)

Description

string watermark_font

Specifies the font to use for the watermark on each page. The BOLD style of the font is used by default.

Values

$watermark_font

  • Define as any of the available font-families.
  • BLANK is default value.

Default: uses the default font-family for the document.

Examples

Example #1

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

$mpdf->SetWatermarkText('DRAFT');
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';

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

See Also

Fork me on GitHub