Thanks for all the ideas. I think the problem must have been some server
setting. But, it's a shared host, and it's too much trouble to try to pierce
their customer support and make it better!
 
So, I ditched <CFCONTENT>, and just gave my users a link to the file. I
don't really care that much about security on this one. Also, I found the
PDF Optimizer in Acrobat, and was able to shrink the file from 2 MB down to
1.2 MB.  I also found the Optimize for Web option that displays the first
pages while the rest of the file downloads.
 
Thanks again,
 
    Clarke

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dusty Hale
Sent: Thursday, May 01, 2008 11:16 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Best way to download a PDF file


It sounds like you answered a lot of your own questions about how to
organize download screens. You could redirect them after download or send to
a download page either would work I would think.
 
About your problem with the download timeout or getting cut off. I had this
same problem with the use of cfcontent and see the note from a previous
thread if your website hosting company uses SeeFusion:
 
----------------------------
1. The webserver has a "monitoring service software on it call SeeFusion" on
it that troubleshoots problem web application scripts that might interfere
with other sites on the server. This enforces some rules for shared server
websites. One rule is called a "forced 50 second timeout". 
 
2. During some testing we noticed that downloaded files were getting
interrupted at 50 seconds so we think the downloads were timing out for some
folks in the case were the download was taking more than 50 seconds. Some of
these files are as large as 15mb so obviously will take longer than 50
seconds for some folks. My code was already configured to run as long as
2000 seconds, however, this monitoring service that is on the server
overrides my application code that tell the server to allow 2000 seconds. 
 
3. Hosting has configured "SeeFusion" to exclude the script that handles the
download.
 
4. Hope this is not confusing. Let me know if you have questions about it.
--------------------------------------
 
Hope this helps. 
 
Dusty

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clarke Bishop
Sent: 05/01/2008 11:02 AM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Best way to download a PDF file


I have a 2 MB PDF that I get's downloaded via a CFM page so that I can do
some tracking of who downloads the page.
 
It seems there are two ways to make this work:
 
#1
<cfcontent type="application/pdf" file="myFile.pdf" reset="yes">
 
Normally, this would just open the PDF in the browser. 
 
 - OR - 
 
#2
<cfheader name="Content-Disposition" value="attachment;
filename=myFile.pdf">
<cfcontent type="application/pdf" file="myFile.pdf" reset="yes">
 
This prompts the user whether they want to save or open the document. 
 
Here are my questions:
 
1. My client thought that some users would not know how to click the save
icon in the Adobe Reader plug-in to save the PDF to their local drive. So,
option 2 would be better as it give them the choice. But, my users are
coming to the page from a link in an email and option 2 leaves open a blank
web browser after the open/save dialog. This might be confusing, too. Is
there another option that will work better? Can I download the page and then
redirect them to a download complete page? Or, maybe I should send them to a
landing page from the e-mail link and then let them download from there?
 
2. With either option, sometimes the file fails to fully download, and the
PDF displays with an error message:
 "There was an error opening this document. The file is damaged and could
not be repaired"
 
I added  <cfsetting requestTimeOut="600"> To try and prevent this problem.
But, somewhere I saw that the requestTimeOut doesn't apply to CFContent, so
I'm not sure this really helps. 
 
The problem was hard to duplicate since it seems to be bandwidth-dependent.
So, I turned on throttling in Charles, and selected a 56K modem to force low
bandwidth. It seems to download consistently for about 2 minutes (About 25%
of the 2MB file), and then just hangs for about 4.5 minutes and produces the
error. I removed the <cfsetting> tag and got essentially the same behavior
-- It goes for 2 minutes, then hangs for 
 
Once I deploy this, I expect thousands of downloads, and I don't want to
have to handle a bunch of support calls. 
 
Any ideas on how to best handle the user interface and prevent this download
timeout would be very much appreciated.
 
     Clarke
 
 

------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 
------------------------------------------------------------- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to