Page 1 of 1

doing a pdf report

Posted: Wed Jun 18, 2008 4:23 pm
by jciglesias
I need some help with the libraries for PDF, I'm working with two of then and I don't know how to use it, when I use the function WriteHtml doesn't work for me, I just got the pdf without the information , please somebody help me..

Re: doing a pdf report

Posted: Wed Jun 18, 2008 4:48 pm
by nowaydown1
First off, welcome to the forum. We need some additional details to help you out. When you say pdf libraries, exactly what are you using? The pdflib extension for PHP? A 3rd party vendor's library? Something else? Also, if you posted your code that you have that would help us get some context. Thanks!

Re: doing a pdf report

Posted: Wed Jun 18, 2008 5:17 pm
by jciglesias
I'm using the library fpdf and pdf
the thing is when I use the function WriteHtml(), this one need a parameter, a view of what a I'm going to convert to PDF

$html = $this->load->view('v_reporte',$data);
define('FPDF_FONTPATH', $this->config->item('fonts_path'));
$this->load->library('HtmlParser');
$this->load->library('fpdf');
$this->load->library('pdf');
$pdf = new PDF();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetFont('Arial','',7);
$pdf->WriteHTML($html);
$pdf->Output();
the pdf works, but doesn't show me the view, just the part of pagination and some standars thing on the top, I load the pdf, you cant take a look