Re: passthru Problems

From: Date: Thu, 12 Apr 2001 19:20:09 +0000
Subject: Re: passthru Problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48353@lists.php.net to get a copy of this message
Greets, Just to elaborate: I want my user to be able to click on a hyperlink that points to my PDF file, and have a new window pop up, displaying the contents of the PDF file in the browser window (without prompting if they should save the file) as well as set the HTML <TITLE> tag to the name of the report. My passthru() function works fine, when I send a header() of PDF first, and then dump the raw PDF out. But, I cannot set any HTML properties with tags (like <TITLE>); it doesn't show the PDF in PDF format then, it shows it all raw encoded. Hope that helps clarifying my wants and needs :-) Cheers, Jason ""Jason Mowat"" <jmowat@digitalpraxis.com> wrote in message news:9b4lso$2gb$1@toye.p.sourceforge.net... > 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: 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 (#48353) next »