Skip to content

pdf generating as empty #13

@rohit-web

Description

@rohit-web

Hi i am using cakephp 2.6 version

i put below code in action -

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

 

INVOICE

Invoice Number:   3487813
Invoice Number:   3487813
Order Number:   3487813
Order Date:   2016-02-15 09:28:21
Invoice To:   stanley leong chin wei  
Invoice Date:   2016-02-15 09:28:21

getting a empty pdf file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions