mPDF Manual – mPDF functions

SetCompression()

(mPDF >= 1.0)

SetCompression – Specifies that mPDF should compress the data for the PDF file

Description

void SetCompression ( boolean $flag )

Specifies that mPDF should compress the data for the PDF file. This makes a smaller PDF file and is set by default to TRUE on initialising the mPDF class.

Parameters

$flag

TRUE or FALSE to specify whether mPDF should compress the data for the PDF file.

DEFAULT: TRUE

Examples

Example #1

<?php

$mpdf = new mPDF();

$mpdf->SetCompression(false);

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

$mpdf->Output('filename.pdf');

?>