html to pdf converter in yii2 with pagination in table -
view: <p> <?= html::a('download page', ['report'], ['class' => 'btn btn-danger']) ?> </p> controller: public function actionreport() { // setup kartik\mpdf\pdf component $pdf = new pdf([ 'content' => $content, 'options' => ['title' => 'krajee report title'], 'methods' => [ 'setheader' => ['krajee report header'], 'setfooter' => ['{pageno}'], ] ]); return $pdf->render(); }
this function works html table has pagination . confused how deal table has pagination.
you should disable pagination. depends on how define data provider (read more data providers here http://www.yiiframework.com/doc-2.0/guide-output-data-providers.html). should this
************* = new activedataprovider([ 'pagination' => false, .............. ]);
i think can call
$dataprovider->pagination =false;
just in case need disable in specific case.
Comments
Post a Comment