Kartik mpdf stops without generating PDF

132 Views Asked by At

I am working on a project which is in Yii2. There is a feature that allows users to export their data in PDF. I am using kartik-v/yii2-mpdf.

"kartik-v/yii2-mpdf": "dev-master",

The PDF contains styling, tables, text, and images.

The logic is written such that it will create 100 pages and then merge them to create 1 PDF.

The issue is that it stops working without giving any warning/error/exception. A 0-size PDF is generated in the last which might cause this issue but I am not sure why it happens.

enter image description here

Before generating the PDF I overridden the memory limits and max execution time.

        ini_set('memory_limit', -1);
        ini_set('max_execution_time', 0);
        set_time_limit(0);

But it didn't help.

All this is done through a CRON job.

0

There are 0 best solutions below