RE: [PHP] Accessing pdf file thru php

From: Date: Wed, 12 Sep 2001 19:25:51 +0000
Subject: RE: [PHP] Accessing pdf file thru php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67072@lists.php.net to get a copy of this message
Are you using Internet Explorer? I've found that broken installations of Acrobat will cause that... Try reinstalling acrobat on your computer, and also try using Netscape... See if they work. --Matt -----Original Message----- From: George Pitcher [mailto:fmdev@yahoo.co.uk] Sent: Wednesday, September 12, 2001 10:01 AM To: Brad S. Jackson Cc: php-general@lists.php.net Subject: Re: [PHP] Accessing pdf file thru php Brad, Thanks for that pointer. However, with that implemented, all I get is the PDF coding dumped onto the screen - no pdf file downloaded! Any further suggestions. I feel as though I'm getting there . . . slowly. George ----- Original Message ----- From: "Brad S. Jackson" <bjackson@McLeodUSA.com> To: "George Pitcher" <fmdev@yahoo.co.uk> Sent: Wednesday, September 12, 2001 2:52 PM Subject: Re: [PHP] Accessing pdf file thru php > > > You should call header() for each header line. And you should only > send one > content type header. > > header("Content-type: application/pdf"); > header("Content-Disposition: inline; filename=D:\\Pdf\\0226138097(57-77).pdf"); > header("Content-Length: $len"); > > > "George Pitcher" <fmdev@yahoo.co.uk> wrote: > Hi all, > > I'm trying to build php into an existing solution which uses Lasso. > > I have tested the passing of data from Lasso to php and that works > fine. > > I want Lasso to pass the filename over to a php page and for that page > to grab the file from a folder outside of the webroot and push it out > to the user, at the same time as presenting them with a confirmation > form so that downloading can be confirmed. > > I have tried the following code without any good results: > > <?php > $filename="D:\\Pdf\\0226138097(57-77).pdf"; > $len = filesize($filename); > $header=" > Content-type: application/pdf > Content-type: application/x-octet-stream > Content-Disposition: inline; filename=D:\\Pdf\\0226138097(57-77).pdf > Content-Length: $len"; > header=($header); > readfile($filename); > ?> > > I get a parse error on the line that calls the header. > > Can anyone help me with this please? > > Regards > > George Pitcher > > Technical Manager > HERON Project > Napier University > Edinburgh EH10 5DT > > fmdev@yahoo.co.uk > gep1@stir.ac.uk > safc2_1nufc@yahoo.com > > http://www.heron.ac.uk > ================================================ > programmer - A device for transmuting caffeine into code. > ================================================ > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#67072) next »