Hi All
I have spent a long while looking through PHPBuilder for help on forcing a browser to open a PDF rathet than display a dialog asking if the user wants open, save or cancel.
I cannot find a solution which actually works. There is lots of solutions/suggestions but they don't work. I have the following code:
header("Pragma: ");
header("Cache-Control: ");
header("Content-type: application/pdf");
header("Content-Disposition: inline; filename="mypdf.pdf");
header("Content-length:".(string)(filesize(mypdf.pdf)));
header("Content-Transfer-Encoding: octet-stream");
header("Content-Description: My pdf");
readfile('mypdf.pdf');
The first two lines are required for a https connection. I have tried both octet-stream and binary.
Can anyone help me please?
Thanks in advance.
BB