Problem in generating pdf through plugin.... |
[eluser]zombica[/eluser]
Hey guys i m using a pdf generation plugin available for CI. Available over here http://www.digitaljunkies.ca/dompdf/downloads.php#doc Problem is that : Here is my controller class pdf function function pdf($cid) { $this->load->plugin('to_pdf'); $this->load->helper('typography'); $data['pageTitle'] = 'Case Detail'; $caseInfo = $this->casemodel->get_single_case($cid); $data['singlecaseView'] = $this->casemodel->get_single_case($cid); $data['row'] = $this->casemodel->get_single_case($cid); $html = $this->load->view('pdf', $data, true);exit; pdf_create($html, 'case_'.$data['row']->caseId); } ............................................... and here is my view pdf file code <? include("layouts/Adminheader.php");?> <? foreach($singlecaseView as $caseView):?> <table cellpadding="0" cellspacing="0" border="0" width="800"> <tr> <td width="60%"><p><strong>Invoice <?=$caseView->caseId;?></strong><br /> <strong><?= date('F d, Y', mysql_to_unix($caseView->date_created));?></strong></p> </td> <td><h2><?= $caseView->case_name;?></h2> <p> <?= $caseView->lfname;?><?= $caseView->llname;?> <?= $caseView->tfname;?><?= $caseView->tlname;?> <?= $caseView->detail;?>, <?= $caseView->case_status;?> </p> </td> </tr> </table> <? endforeach;?> <? $name; exit; ?> <? include("layouts/Adminfooter.php");?> .......................... problem is that in controller function pdf() it loads my view page and displays all the data on view page but it does not reads pdf_create($html, 'case_'.$data['row']->caseId); function and does not comes into it. Is some thing i am missing and where does this pdf file will be generated. Where can i see my pdf generated file. Thanx in advance. Regards.....
[eluser]zombica[/eluser]
Hey Guys does PDF generation plugin support for CI given by Derek Allard... Does not support tables,tr,td. Do i have to use only the paragraph, headings, li or some thing like this.
[eluser]Thorpe Obazee[/eluser]
[quote author="zombica" date="1246271936"]Hey Guys does PDF generation plugin support for CI given by Derek Allard... Does not support tables,tr,td. Do i have to use only the paragraph, headings, li or some thing like this.[/quote] The library is dompdf by http://code.google.com/p/dompdf/. It has support for tables.
[eluser]johnwbaxter[/eluser]
Why don't you take a look at the code for bambooinvoice.org which uses this pdf lib? |
Welcome Guest, Not a member yet? Register Sign In |