I believe there is header called "Content-disposition: filename.pdf" which
is defined in the proper RFC.  And as far as I know some browsers don't
respect it.  Search the list for it, you should find allot of info.

Mike

-----Original Message-----
From: Jason Mowat [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 12:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] passthru Problems


Greetings,

I am having a small problem displaying PDF files to my users via passthru.
This is the situation: I have a bunch of PDF files on my server directory.
I show the user a listing of the PDF files they can view, and allow them to
hyperlink click on the PDF they wish to browse.  When the user clicks the
link, I execute a header() and then my passthru on my PDF file.  The code is
essentially:
header("Content-type: application/pdf");
passthru($pdf_file);

Now, my problem is that the title of the HTML window that pops up is of the
URL path.  I want to set the title to something meaningful (like the name of
the PDF file the user is looking at).  But, if I try to print a "<TITLE>PDF
File</TITLE>" after the header, my PDF document does not show up (it shows
the raw encoding of the PDF document).

Does anyone have any suggestions to allow me to show a title on a
header/passthru page?  Is there a better way to do this?

Cheers,
Jason



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to