• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help here

#5
In your existing code, you're working with an object named $pdf. I assume this depends on a third-party library.
You can use this in CI as well.
E.g. the fpdf library. The Fpdf.php file goes into the application/libraries folder. In CI 3.x it must have a first capital letter.

In my controller where I want to generate a pdf, I have this code:
PHP Code:
$this->load->library('fpdf'); 
This creates an object.
The methods and properties of this object are addressed like this:
PHP Code:
$this->fpdf->AddPage('L');
$this->fpdf->SetFont('Helvetica','',11);
..
..
$this->fpdf->Output("mydocument.pdf","D"); 
Etc.
Reply


Messages In This Thread
Need Help here - by morocho1979 - 01-19-2016, 05:46 AM
RE: Need Help here - by sv3tli0 - 01-19-2016, 06:20 AM
RE: Need Help here - by morocho1979 - 01-19-2016, 06:23 AM
RE: Need Help here - by Diederik - 01-19-2016, 07:41 AM
RE: Need Help here - by Wouter60 - 01-19-2016, 01:35 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.