YII2 Kartik gridview disable pdf export -


how disable pdf export property in kartik gridview?

i have installed kartik gridview , gave me following error.

the class '\kartik\mpdf\pdf' not found , required pdf export functionality. include pdf export, follow install steps below. if not need pdf export functionality, not include 'pdf' format in 'export' property. can otherwise set 'export' false disable export functionality.

please ensure have installed 'yii2-mpdf' extension. install, can run console command application root:

php composer.phar require kartik-v/yii2-mpdf: "@dev"

i not want installe mpdf. want disable it. can edit it?

you should set export property false, it's mentioned in error text.

use kartik\grid\gridview;  ...  <?= gridview::widget([     ...     'export' => false, ]) ?> 

read more in official docs.

update:

another way exclude pdf format exportconfig.

<?= gridview::widget([     'exportconfig' => [         gridview::csv => [             ...         ],         ... // make sure there no gridview::pdf     ], ]) ?> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -