Julian, Thanks, I'll try that.
Was able to make it work by specifying reset="yes" and doing a <cfabort> right after like: <cfheader name="Content-Disposition" value="inline"> <cfcontent type="application/vnd.fdf" reset="Yes"><cfoutput>%FDF-1.2 %���� 1 0 obj << /FDF << /Fields [ <cfloop index="i" from="1" to="#arraylen(FieldNames)#"> << /V (#FieldValues[i]#)/T (#FieldNames[i]#)>></cfloop> ] /F (#pdfFile#)>> >> endobj trailer << /Root 1 0 R >> %%EOF</cfoutput> <cfabort> but had an unwanted side effects due to the <cfabort>. Blue -----Original Message----- From: Julian Halliwell [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 5:04 PM To: [EMAIL PROTECTED] Subject: Re: CFCONTENT (PDF) and FB3 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 ==^================================================================
