mPDF Manual – mPDF Variables

showStats

(mPDF >= 4.0)

showStats – Display performance data for the generated PDF file

Value

void showStats

Specify whether to show performance data. Useful if you are developing with mPDF, and want to test different configurations.

Values

$showStatsTRUE FALSE

Values

TRUE : enable display of data

FALSE: disabled

DEFAULT: FALSE

Changelog

VersionDescription
4.0 Variable was added.

Examples

Example #1

<?php

// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new mPDF();

$mpdf->showStats = true;

$mpdf->WriteHTML("Hallo World");

$mpdf->Output();

?>
This will suppress output of the PDF file, and display data on the browser such as:
Generated in 0.45 seconds

Compiled in 0.46 seconds (total)

Peak Memory usage 10.25MB

PDF file size 37kB

Number of fonts 6

See Also