>We're using a CFContent to push files to a client page (after they've
>clicked on an appropriate link of course).  Things are working for image
>files, but we are getting odd behaviour when we try to view PDF documents.
>
>Here's the code in question:
>
>   <!--- Set the name of the download file in the HTTP header --->
>   <CFHEADER NAME="Content-Disposition"
>VALUE="filename=#oFTS.OriginalName#">
>   <!--- Send the file (using the physical path to it) --->
>   <cfcontent type="#sMimeType#" file="#sSourcePath#" deletefile="no">
>
>and the supporting variables are:
>   Mime TYpe: application/pdf
>   File Name: 2003100809073301noisereport.pdf
>   Path and File:
>C:\inetpub\wwwroot\caa\ctreg_web\fts_files\2003100809073301noisereport.pdf
>
>What's happening is that the PDF file is getting dumped as raw text to the
>page, or we see a prompt to save our action page (getfile.cfm).  However,
>this is a near exact copy of an existing routine from another application
>we
>did.  In the other application, the PDF plug-in kicks in and we view the
>file in Adobe Acrobat.  It would appear that in the process of copying and
>modifying the code, something minor was changed to result in this new
>behaviour.  However, we've now had 3 people look at the code and we don't
>see anyting that should be causing this issue.
>
>Does anyone see anything wrong or have any suggestions?  My thoughts are
>that we have missed something stupid...

The only issue I've run into is with whitespace. If the binary text of the
PDF isn't the absolute very first character on the page, it won't display
correctly. Make sure you've cfsilent-ed to absolutely compress all
whitespace if you haven't already.

Regards,
Dave.


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to