Lawrence, it seems the way round it is to specify the content via the "file"
attribute of CFCONTENT, rather than putting it below the tag. If it already
exists as a file that you want the user to download then you just provide
the absolute path, but if you're generating the content dynamically then
you'll need to save it first as a temporary file. Here's an example creating
an RTF file.
<!--- generate the rtf content --->
<cfset mycontent = "RTF content stuff generated as variable here">
<!--- write the variable to a physical file --->
<cffile action="write" file="C:\temp\myfile.rtf" output="#mycontent#">
<!--- tell browser that the content is an attachment to be downloaded --->
<cfset filename = chr(34) & "myfile.rtf" & chr(34)>
<cfheader name="Content-Disposition" value="attachment;
filename=#filename#">
<!--- serve the content and then delete the temporary file on the
server --->
<cfcontent type="application/msword" deletefile="Yes"
file"C:\temp\myfile.rtf">
btw Nat, thanks for the mention on your site, but it's Halliwell as in Geri
(or Leslie as I prefer), not "Howell" (guess it depends on your accent
though :-)
Julian.
> I have a module that needs to send a specific format (PDF) to the client
> browser. I've used cfcontent in a non-fb3 and worked fine.
>
> However, when used in FB3, it fails because of the extra white spaces
> before the actual data written out by the <cfcontent tag.
>
> How do I make sure that the output is only the data sent out by
cfcontent.
==^================================================================
This email was sent to: [email protected]
EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]
T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================