diff --git a/crud/default/controller.php b/crud/default/controller.php index 13fda53..d025ce5 100644 --- a/crud/default/controller.php +++ b/crud/default/controller.php @@ -207,7 +207,7 @@ public function actionPdf() { - $content = $this->renderAjax('_pdf', [ + $content = $this->renderPartial('_pdf', [ 'model' => $model, $rel): ?> skippedRelations)): ?> @@ -216,6 +216,7 @@ public function actionPdf() { ]); + Yii::$app->response->clearOutputBuffers(); $pdf = new \kartik\mpdf\Pdf([ 'mode' => \kartik\mpdf\Pdf::MODE_CORE, 'format' => \kartik\mpdf\Pdf::FORMAT_A4,