All you have to do, is create a taf that reads in the DATA of the pdf
file, create your own custom header and serve the data out. The custom
header MUST have a correct content-length, or it won't be compatible
with all browsers. content-type should be application/pdf, and THIS IS
THE IMPORTANT PART, content-disposition needs to be:
attachment; filename=thefilename.pdf
Substitute "thefilename.pdf" with the filename you wish. You can also
even do this with JPEGs or other image formats, and the browser will
not display, but instead download. I use this technique in witango and
php on several sights in production.
--
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On May 7, 2008, at 7:38 AM, Stefan Gonick wrote:
Hi Everyone,
I need to create a link to a PDF file that immediately brings up a
download dialog
instead of opening the file. Does anyone know how to do this?
Thanks,
Stefan
=====================================================
Database WebWorks: Dynamic web sites through database integration
http://www.DatabaseWebWorks.com
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf