| sebastian 2004-03-26, 11:12 pm |
| Hi.
I need some help with this:
there is a link to open pdf file:
script.php?file=sth.pdf
content of script.php:
$fp = fopen ($file, "rb");
header ("Content-Transfer-Encoding: binary");
header ("Content-Type: application/pdf");
header ("Content-Disposition: inline; filename=$file");
header ("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
header ("Content-Description: $file");
header ("Content-Length: $size");
fpassthru ($fp);
fclose ($fp);
Everything with openeing .pdf file is ok. Problem is with name of this file.
When I click in Adobe Acrobat "Save Copy As" deafult file name is
script.php_file=sth.pdf
How to change default filename?
In addition - when I right click on link, and select "Save target as"
dafault filename is ok (in this case sth.pdf).
Have you got any ideas? I'll be very grateful.
Thanks,
sebastian
|