Welcome Guest, Not a member yet? Register   Sign In
Download pdf file in browser Chrome com mPdf
#3

(01-30-2020, 12:55 PM)jreklund Wrote: Have you tried this?
PHP Code:
$pdf $mpdf->Output('my-file.pdf''D')->setContentType('application/pdf'); 

And you should not use the return $pdf; part. As it should output to your browser, so just deleting that may help as well.

Hello jreklund, thanks for the help!

I had already tried it that way, but it returns ERR_INVALID_RESPONSE


PHP Code:
return $mpdf->Output('my-file.pdf''D'); 
This way the file is downloaded in Chrome, but not on Android!
Reply


Messages In This Thread
RE: Download pdf file in browser Chrome com mPdf - by PHS - 01-30-2020, 01:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB