We want to use the FPDF library in one of our controllers.
We created the following files:
---fdpf_wrapper.php <-- this is our class (FdpfWrapper) which extends the base FPDF class
First of all, package paths must be registered in order to be used with
Lib/Fpdf is no such one, by default only the core packages are registered.
You could either extend the paths for an already existing package, in your case that would be
App::build(array('Lib' => array(APP . 'Lib' . DS . 'Fpdf' . DS)));
And then use
or better add a new package:
App::build(array('Lib/Fpdf' => array(APP . 'Lib' . DS . 'Fpdf' . DS)), App::REGISTER);
Then you can use
And last but not least, of course the filename must follow the CakePHP conventions as already mentioned by @Nunser, ie
fdpf_wrapper.php must be renamed to