- Download dompdf : https://code.google.com/p/dompdf/
- Extract and copy dompdf folder to protected\vendor
- Add the following command to the top of controller that will using dompdf
Yii::import('application.vendor.*'); require_once('dompdf/dompdf_config.inc.php'); Yii::registerAutoloader('DOMPDF_autoload');
- Then we should can used like this
public function actionDompdf() { ... $pdf = new DOMPDF(); ... }
I think we can use the same way to including/import another library