mPDF Manual – mPDF Variables

tabSpaces

(mPDF >= 2.3)

Description

int tabSpaces

Specifies the number of spaces to substitue for a TAB character when parsing HTML input between <pre>…</pre> tags. The default value (8) is consistent with the HTML specification, but many programs including Windows NotePad uses a value of 6.

Values

$tabSpaces

Values

Integer value greater than 0

DEFAULT: 8

Examples

Example #1

<?php

$mpdf = new mPDF();

$mpdf->tabSpaces = 6;

$html = file_get_content('NotePad.txt');

$mpdf->WriteHTML('
'.$html.'</pre>');

$mpdf->Output();

?>