public function generate_pdf() {
$this->Mpdf->init();
// setting filename of output pdf file
$this->Mpdf->setFilename('file.pdf');
// setting output to I, D, F, S
$this->Mpdf->setOutput('D');
// you can call any mPDF method via component, for example:
$this->Mpdf->SetWatermarkText("Draft");
}
generate_pdf.ctp
cart shop
77 Wing Hong Street, Kowloon, Hong Kong Tel +852 5555821
Hi i am using cakephp 2.6 version
i put below code in action -
public function generate_pdf() { $this->Mpdf->init();
}
generate_pdf.ctp
cart shop
77 Wing Hong Street, Kowloon, Hong Kong Tel +852 5555821
INVOICE
getting a empty pdf file