I\'m using the mpdf library to generate a PDF of user-generated html. I can get the PDF to save to the server successfully, but I want the PDF to open in the browser for the
To indicate to the browser that the file should be viewed in the browser
Content-Type: application/pdf
Content-Disposition: inline; filename.pdf
To have the file downloaded rather than viewed
Content-Type: application/pdf
Content-Disposition: attachment; filename.pdf
Or using php
header('Content-Type: application/pdf');
header('Content-Description: inline; filename.pdf');