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

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

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

Post 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();
Last edited by Chris Corbyn on Fri Dec 02, 2005 10:03 am, edited 1 time in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It seems that if I make the PDF open in the browser window it works fine.

Thanks anyway :)
Post Reply