Re: PDF on the fly

From: Date: Mon, 20 Nov 2000 19:46:40 +0000
Subject: Re: PDF on the fly
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26331@lists.php.net to get a copy of this message
Adding the second header line solved the problem. header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=myPDF.pdf" ); Now the browser knows that the file being passed to it is not only an 'application/pdf' but that the extension is *.pdf. Everything works now, I've removed .pdf as a php processed extension. This would solve the problem on zend.com of downloading files named 'do_download.php' instead of 'php-4.0.3pl1.tgz' ;^) DAve on 11/17/00 11:50 AM, Dave Goodrich at daveg@rblc.com wrote: > We are having a problem getting pdf built on the fly (in ram) to properly > display to windows clients. > > Wwe have been battling the issue of application type vs file suffix. Some > browser/platforms do fine with the application type set to application/pdf, > and some need the file suffix set as well to properly display the file. > > I now have set apapche to allow files with the .pdf suffix to be processed > by php _only in the pdf directory_ and that is working fine. I name my php > pages *.pdf and call them with the browser, they are processed and return > the pdf file. Now Mac/Win netscape correctly handle the dynamic pdfs as does > netscape on the PC. > > My problem is that explorer on the pc claims that the web server is > unreachable when I attempt to serve a pdf on the fly in this fashion. > > What solution are others doing about serving dynamic PDFs from ram? I'd > prefer now to have to save these to a temp directory on disk as they are > only valid for a short while (hours). > > Thanks > > DAve > -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 daveg@rblc.com http://www.rblc.com

« previous php.general (#26331) next »