i want to generate a pdf in moodle 2.9. when a particular function is called. i have tried the following.
public function test()
$doc = new pdf;
$doc->Write(5, 'Hello World!');
but its not working. i have included require_once('../../config.php') and require_once("$CFG->libdir/pdflib.php"); . please help me