doing a pdf report

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jciglesias
Forum Newbie
Posts: 2
Joined: Wed Jun 18, 2008 4:16 pm

doing a pdf report

Post 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..
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: doing a pdf report

Post 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!
jciglesias
Forum Newbie
Posts: 2
Joined: Wed Jun 18, 2008 4:16 pm

Re: doing a pdf report

Post 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
Attachments
doc.rar
(10.6 KiB) Downloaded 355 times
Post Reply