php - PDF have too many items +100, Any Solution? -
i hope can me problem have when exporting many elements in pdf file.
when export it, file created , generated on single sheet, , there 100 products or more pdf file see nothing. can me this? or has happened before? help.
<?= gridview::widget([ 'dataprovider' => $dataprovider, 'filtermodel' => $searchmodel, 'showpagesummary'=>false, 'responsivewrap'=>true, 'condensed'=>true, 'pjax'=>false, //deshabilitado por doble pjax 'striped'=>true, 'hover'=>true, 'panel'=>['type'=>'primary', 'heading'=>'recibos'], 'toolbar'=>[ '{export}', '{toggledata}' ], 'export' =>[ 'target'=>'_self', 'fontawesome' => true, 'label' => 'exportar', 'dropdownoptions' => [ 'class' => 'btn btn-default' ], // 'oninitsheet' => function (phpexcel_worksheet $sheet, $grid) { // $sheet->getdefaultstyle()->applyfromarray(['borders' => [ 'allborders' => ['style' => phpexcel_style_border::border_thin ]]]); // }, ], 'exportconfig'=> [ gridview::excel=>[ 'filename' => $this->title, ], gridview::pdf=>[ 'filename' => $this->title, ], gridview::text=>[ 'filename' => $this->title, ], gridview::html=>[ 'filename' => $this->title, ], ], 'columns' => [ ['class'=>'kartik\grid\serialcolumn'], // [ // 'class'=>'kartik\grid\expandrowcolumn', // 'width'=>'50px', // 'value'=>function ($model, $key, $index, $column) { // return gridview::row_collapsed; // }, // 'detail'=>function ($model, $key, $index, $column) { // // echo '<pre>'; // // print_r($model); // // die; // $searchmodel= new recibodetallesearch(); // //$searchmodel->id_recibo = $model->id; // // $searchmodel->id_recibo = 7; // // echo '<pre>'; // // print_r($id); // // die; // $dataprovider= $searchmodel->search(yii::$app->request->queryparams); // // echo '<pre>'; // // print_r($dataprovider); // // die; // return yii::$app->controller->renderpartial('/recibo-detalle/index', [ // 'searchmodel' => $searchmodel, // 'dataprovider' => $dataprovider // ]); // }, // 'headeroptions'=>['class'=>'kartik-sheet-style'], // 'expandoneonly'=>true // ], [ 'attribute'=>'factura', 'value'=>'factura', 'group'=>true, 'subgroupof'=>1, 'label' => 'recibo' ], [ 'attribute'=>'id_cliente', 'value'=>'id_cliente', 'group'=>true, 'subgroupof'=>1, ], [ 'attribute'=>'id_ciudad', 'value'=>'id_ciudad', 'group'=>true, 'subgroupof'=>1, ], [ 'attribute'=>'fecha', 'value'=>'fecha', 'group'=>true, 'subgroupof'=>1, 'filtertype'=> gridview::filter_date, 'filterwidgetoptions'=>[ 'pluginoptions' => [ 'autoclose'=>true, 'format'=>'yyyy-mm-dd', ] ], ], [ 'attribute'=>'r_eliminado', 'value'=>'r_eliminado', 'group'=>true, 'subgroupof'=>1, 'hiddenfromexport'=> true, ], //detalle [ 'attribute'=>'id_producto', 'value'=>'id_producto', 'label'=>'producto' ], [ 'attribute'=>'rd_eliminado', 'value'=>'rd_eliminado', 'hiddenfromexport'=> true, ], [ 'attribute'=>'gestionado', 'value'=>'gestionado', 'width'=> '80px', 'hiddenfromexport'=> true, ], [ 'class' => 'kartik\grid\actioncolumn', 'header'=> 'acciones', 'headeroptions'=> ['style'=>'text-align:center'], 'contentoptions'=> ['style'=>'text-align:center'], 'template'=>'{delete} {view} {update} {gestionar}', 'options' =>['width'=> '100px'], 'hiddenfromexport'=> true, 'buttons'=>[ 'gestionar'=> function($url, $model) { return html::a( '<span class = "glyphicon glyphicon-tasks "> </span>', $url, [ 'title'=>yii::t('app','gestionar'), 'class'=>'gestionargarantias', ] ); } ], 'urlcreator' => function($action, $model, $key, $index) { if ($action === 'gestionar') { $url = yii::$app->request->baseurl.'/gestion/create?id_recibo='.$model['id'].'&id_recibo_detalle='.$model['id_recibo_detalle']; return $url; } if ($action === 'view') { $url = yii::$app->request->baseurl.'/recibo/view?id='.$model['id']; return $url; } if ($action === 'update') { $url = yii::$app->request->baseurl.'/recibo/update?id='.$model['id']; return $url; } if ($action === 'delete') { $url = yii::$app->request->baseurl.'/recibo/delete?id='.$model['id']; return $url; } } ], // [ // 'class' => '\kartik\grid\checkboxcolumn' // ] ],
Comments
Post a Comment