public function download($sFilename = '', $aOptions = [])
    {
        $sFilename = $sFilename ? $sFilename : self::DEFAULT_FILE_NAME;

        //  Set the content attachment, by default send to the browser
        $aOptions['Attachment'] = 1;

        $this->oDomPdf->render();
        $this->oDomPdf->stream($sFilename, $aOptions);
        exit();
    }
public function download($sFilename = '', $aOptions = [])
    {
        $sFilename = $sFilename ? $sFilename : self::DEFAULT_FILE_NAME;

        //  Set the content attachment, by default send to the browser
        $aOptions['Attachment'] = 1;

        $this->oDomPdf->render();
        $this->oDomPdf->stream($sFilename, $aOptions);
        exit();
    }
public function download ( $ sFilename = '' , $ aOptions = [ ] ) { $ sFilename = $ sFilename ? $ sFilename : self :: DEFAULT_FILE_NAME ; //  Set the content attachment, by default send to the browser $ aOptions [ 'Attachment' ] = 1 ; $ this -> oDomPdf -> render ( ) ; $ this -> oDomPdf -> stream ( $ sFilename , $ aOptions ) ; exit ( ) ; }
Renders the PDF and sends it to the browser as a download.

@param  string $sFilename The filename to give the PDF
@param  array  $aOptions  An array of options to pass to DomPDF's stream() method

@return void|bool
Renders the PDF and sends it to the browser as a download .