Topic: Need to compress the report file

Curious on the case when report file i.e. pdf of excel gets heavy like 20MB. How can we compress/"zip" the pdf or xls report file on server and take it as output i.e. .zip or .gz file so download bandwidth can be reduced and user will have to wait for lesser time.

Chaitanya

Re: Need to compress the report file

Regarding pdf files, the tcpdf class used for pdf generation does make use of zlib library if it is available in your installation. You can make simple test if you are not sure: just download the pdf file and run gzip on it. When after compression the result file has much lower size you can try change php settings to enable compression (see http://pl2.php.net/manual/en/zlib.configuration.php)

Re: Need to compress the report file

Thanks Janusz,
That worked.

Chaitanya