Well here’s how to open a pdf file and serve it to the browser with PHP:
PHP:
1 2 3 4 5 6 7 8 9 10 11 12 |
<?php header("Content-type:application/pdf"); // It will be called downloaded.pdf header("Content-Disposition:attachment;filename='downloaded.pdf'"); // The PDF source is in original.pdf readfile("original.pdf"); //always exit exit; ?> |
source: Stackoverflow