Export Reports To Pdf

I have a CGridView in my form using CSqlDataProvider and I want to create an exporting of report in PDF, I have tried yii-pdf using htmlpdf but when I use:

$mPDF1->WriteHTML($this->renderPartial(‘index’, array(), true));

It didnt save a PDF file.

Are there any good tutorials for beginners in making pdf reports in yii?


I personally use TCPDF. I use an external generator that i pass information to.

But as a start you can use the Yii TCPDF extension

Yii TCPDF extension



With my pdfable extension you can render views as PDF. But it requires wkhtmltopdf to be installed.