Page 1 of 1

[SOLVED] Acrobat giving file not found error when opening...

Posted: Fri Dec 02, 2005 9:11 am
by Chris Corbyn
Hi,

I've written a PDF report at work and it all works fine in Firefox.... the script prompts the download of the PDF file or just open in Acrobat.

When I run this in IE it works fine if you download the file to disk and save it. But if you select "Run" from the save dialog box Acrobat simply gives the error:
There was an error opening this document. This file cannot be found.
It's as if IE isn't downloading the file before it open it :(

Any clues how to get around this.... from the coding point of view, not the user's end. Telling our users to Save the file then open it isn't what we're looking to do :( I'm hoping there may be some magic header tricks?

This is being used in schools and they are all using IE 6 or above.

Thanks,

d11wtq

Note: There's nothing fancy in the headers at the mo....

Code: Select all

header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename=Something.pdf');
echo $pdf->output();
exit();

Posted: Fri Dec 02, 2005 10:03 am
by Chris Corbyn
It seems that if I make the PDF open in the browser window it works fine.

Thanks anyway :)