0

I have used mpdf for pdf creation. Now, I want to download the generated pdf file to my local machine.

I used below code for this.

$mpdf->Output('dummy.pdf', 'D');

But, its not working for me. Please help me

Andreas
  • 5,305
  • 4
  • 41
  • 60
  • Have tried the forced header solution? http://stackoverflow.com/questions/12139204/auto-download-mpdf-generated-pdf-document – cosmoonot Apr 12 '17 at 15:29
  • Possible duplicate of [Auto download mpdf generated pdf document](http://stackoverflow.com/questions/12139204/auto-download-mpdf-generated-pdf-document) – cosmoonot Apr 12 '17 at 15:31

1 Answers1

0

Maybe try this:

$mpdf->Output('filename.pdf', Path::FILE);

Or look at the documentation: https://mpdf.github.io/reference/mpdf-functions/output.html

Hope this helps.