Thanks Matt..

Iwill test this method...

Al

-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 02, 2005 5:19 PM
To: CF-Talk
Subject: Re: Force PDF Download


Aldon,

I have a tutorial on my site on how to do this, but just to be sure I
ran it again in FF and IE to make sure it really works.

Here's the base code:

<cfset FilePath="z:\foo\bar\">
<cfset FileName="myfile.pdf">
<cfset MIMEType="application/pdf">
<cfset DisplayType="inline">
<cfset FileToPush=FilePath&FileName>
<cfheader
   name="content-disposition"
   value="#DisplayType#; filename=#FileName#">
<cfcontent
   type="#MIMEType#"
   file="#FileToPush#">

The intent of the above is to get a file to display inside of the
browser, via the Acrobat browser plugin we (probably) all have
installed.  On IE 6 it worked great.  On FF 1.0.4 the Acrobat plugin
splash screen fired up but no display.  Same failure across multiple
attempts.

Next, I changed the value of DisplayType to Attachment.

<cfset DisplayType="attachment">

The idea being you want the item to open not inside of the browser,
but instead you want the actual Acrobat program to open up separately
and display the file


In FF this gave me the open-or-save dialog.  Perfect.  Same in IE6,
where I chose Open and the Acrobat plugin loaded separately and
brought up my file.

It seemed in the beginning you were doing all the stuff I'm doing
here.  If so and you're getting an error I would look to file path
problems, or naming the thing wrong.  Also you have no space before
your filename= parameter and I use one.  Maybe thats it.

--
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222970
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to