Re: Finally, PDF Header for PDF stuffs that work....
| From: | John Herren | Date: | Thu, 16 Oct 2003 22:05:56 +0000 |
| Subject: | Re: Finally, PDF Header for PDF stuffs that work.... | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166365@lists.php.net to get a copy of this message | ||
Curt Zirzow wrote:
* Thus wrote John Herren (john@d2interactive.com):header("Content-Type: application/pdf"); header("Accept-Ranges: bytes"); header("Content-Length: ".filesize($thefile)); readfile($thefile); Can anybody tell me why the browser is waiting for the entire file before it's displayed(using php)? I don't think the average user will have the patience to stare at a blank browser waiting for the file.This is a pdf issue I believe. There is an option in the PDF called 'Fast Web View', if this is set adobe doesn't need to read the whole thing before starting to view. Check the pdf's 'Document properties' and You'll see if the option is set or not. If not, resave the document enabling that option. Acrobat 5 has a nice little batch thing to convert serveral docuements into this mode. HTH, Curt I appreciate that advice. And Fast Web View is disabled. But I still don't understand why calling the file directly gives immediate output, but if I generate the headers and readfile() the file to the browser (same exact file) it waits to get the whole file.