![]() |
|
|
|||||||
| PHP - Code PHP programming - Ask questions and help people with PHP code. If you are stuck and need help, this is where you ask for help. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
A quick web search brings up:
Unintrusively Streaming Pdf Documents Into A Web Page |
|
|||
|
Found a solution. Here is what I used:
$filename = $_GET['pdfdoc']; $pdfcontents = file_get_contents($filename); header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: public'); header('Content-Description: File Transfer'); header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename= pdffile.pdf'); header('Content-Transfer-Encoding: binary'); echo $pdfcontents; |