mPDF Manual – mPDF Variables

simpleTables

(mPDF >= 4.3)

simpleTables – Disables complex table borders etc. to improve performance

Description

void simpleTables

Specify whether to disable complex table borders etc. to improve performance. The border for all table cells will be the same (although separate values can be used for -top, -left etc.). A separate table border may still be specified (if border-collapse is not used).

This may improve performance considerably for large tables, reducing memory use and increasing processing speed by approximately 30%

Values

$simpleTablesTRUE FALSE

Values

TRUE : disable complex table borders etc.

FALSE: allow full CSS support for tables

DEFAULT: FALSE

Changelog

VersionDescription
4.3 Variable was added.

Examples

Example #1

<?php

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

$mpdf = new mPDF();

$mpdf->simpleTables = true;

$mpdf->WriteHTML($table);

$mpdf->Output();

?>