Firstly you must have
fpdf class. Download at
www.fpdf.org
This is my step.
1- Create action button for view your pdf.
2- I have create some class that extends
fpdf class (for setting header and footer), like this
Code:
include_once(moduleDir("report")."fpdf.php");
class categorysummary extends FPDF
{
function Footer(){
//write your footer
}
function Header(){
//write your header
}
}
3- On main of your class.
Code:
include_once(moduleDir("report")."categorysummary .php");
class categoryreport extends atkNode
{
function action_search(){
.....
$this->pdfplan();
}
function pdfplan(){
$pdf=new categorysummary ('L','mm','A4');
$pdf->AddPage();
$pdf->SetFont('Arial','B',8);
$pdf->Cell(280,5,"Hello ATK",0,1,'L');
$pdf->Output();
$pdf->closeParsers();
exit();
}
}