Welcome Guest, Not a member yet? Register   Sign In
Problem with PDF
#1

I Use MPDF in CI3 thare no problem

but with CI 4 next

i do like this

$this->response->setHeader('Content-Type', 'application/pdf');
$PDF->Output("File.pdf", 'I');


In Mozilla is ok, but in Chrome, its open like PDF but when i save it save like html (nmot pdf in html just page when pdf was created)
Reply
#2

Try Content-Disposition header
Reply
#3

(01-05-2023, 07:14 AM)Mni.day Wrote: Try Content-Disposition header

$this->response->setHeader('Content-Type', 'application/pdf');
$this->response->setHeader('Content-Disposition', 'inline;filename="file.pdf"');

BY this way browser dold me error with protocol
Reply




Theme © iAndrew 2016 - Forum software by © MyBB