I am using Clist View to show data such list top post on facebook. Now there is a download option . I want to download Clist view data in pdf format . I search on google but i don't find and best example. What should i do to download data of clist view in pdf format.
List view widget:
$this->widget('zii.widgets.CListView', array(
'dataProvider' => $data_top_posts,
'id' => 'tbl-top-posts',
'itemView' => '_top_posts',
'template' => '{items}',
'beforeAjaxUpdate' => 'js:function(id, data){
$("#" + id + " .items span.empty").html("Loading... Please wait.");
}',
'afterAjaxUpdate' => 'js:function(){
setProgressBar("#tbl-top-posts");
}',
'viewData' => array(
'id' => 'tbl-top-posts',),
));
There is no build-in function for such thing. But you can make that:
Example
Example
You can use any other HTML to PDF tool, not only TCPDF.
Resources:
TCPDF, DomPDF
Html2Canvas