How can i force download the pdf
fullstackdevloper opened this issue · 1 comments
fullstackdevloper commented
Hey is there a way so that i can force download this as pdf ?
public function downloadStatement() {
$this->autoRender = false;
$this->loadModel('Statements');
$CakePdf = new \CakePdf\Pdf\CakePdf();
$CakePdf->template('agencystatement', 'default');
$CakePdf->viewVars($this->viewVars);
$pdf = $CakePdf->output();
}
ADmad commented
This is not a help forum. The issue tracker is reserved for possible
bugs and feature enhancements to the CakePdf plugin.
Please visit one of the following CakePHP support forums for help:
- CakePHP Official Forum
- Stackoverflow
- Slack channel
- #cakephp channel on irc.freenode.net
Thanks!