Curt -
Thank you for the quick response. The file is being sent and the PDF reader does try to open it, but it is corrupted. When I change the Disposition to
header("Content-Disposition: attachment; filename=image.pdf")
and save the file, it cannot be opened do to errors within the file. Yet, the file can be opened on the server.
Am I missing something simple here?
Todd
Curt Zirzow wrote:
* Thus wrote Todd Cary:
After reading the online documentation, it appears that I should be using the following code, however it does not appear to work. Are there some obvious errors?
...
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=image.pdf");
//header("Content-Disposition: attachment; filename=image.pdf");
header("Content-Length: $download_size");
header("Connection: close");
The problem comes down to how the client is configured to display a pdf file. IIRC, inline doesn't force the browser to display it within the browser, it all depends on the content-type, and if a plugin is suppose to load within the browser at that point.
If you search the archives, your answer may be revealed :)
Curt
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php