Tag: save-pdf

Save and Display DOMPDF

Save PDF file on server and display in users browser: $file_to_save = '/home/stsnew/public_html/pdf/file.pdf'; //save the pdf file on the server file_put_contents($file_to_save, $dompdf->output()); //print the pdf file to the screen for saving header('Content-type: application/pdf'); header('Content-Disposition: inline; filename="file.pdf"'); header('Content-Transfer-Encoding: