12-01-2010, 01:27 AM
[eluser]diasansley[/eluser]
i am using the following controller but when i say localhost/codeigniter/pdf_test
it says object cannot be found.
Thanks Rgds
i am using the following controller but when i say localhost/codeigniter/pdf_test
it says object cannot be found.
Code:
<?php
class pdf_test extends Controller {
function pdf_test()
{
parent::Controller();
}
function tcpdf()
{
$this->load->library('pdf');
// set document information
$this->pdf->SetSubject('TCPDF Tutorial');
$this->pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set font
$this->pdf->SetFont('times', 'BI', 16);
// add a page
$this->pdf->AddPage();
// print a line using Cell()
$this->pdf->Cell(0, 12, 'Example 001 - €à èéìòù', 1, 1, 'C');
//Close and output PDF document
$this->pdf->Output('example_001.pdf', 'I');
}
}
?>
Thanks Rgds