Hi,

You can use the header "Content-Disposition: inline", followed by "Content-Type: application/pdf".

Then you can output your PDF file using readfile($pathToPdfFile) or print(file_get_contents($pathToPdfFile))

Hope this helps!
Christophe Deliens -- get2future


Ron Herhuth wrote:
I am writing a script that does a database check and then based on several conditions I 
need to give the user a PDF file to view in the browser.  Normally I would use the 
header("Location: the_file.pdf") command but this doesn't work...most likely 
because it doesn't try to resolve the MIME type.  Is there a way to load the PDF in the 
users browser?

Thanks,
Ron




-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to