Hi folks,

What parts of this aren't yet implemented, building the pdf or
automatically printing it?

My requirement isn't quite the same, but related. I need to generate a
pdf of an existing query listing. This code works in CF:

<cfdocument format="PDF" name="sqlResult"><cfoutput>#sqlResult#</
cfoutput></cfdocument>
<cfheader name="Content-Disposition" value="attachment; filename=""sql
results.pdf""">
<cfcontent variable="#sqlResult#" type="application/pdf" reset="Yes">

In that form, a Save/Open dlg comes up, with the correct filename, and
choosing Open brings up my pdf app (FoxIt Reader), but with an alert,
"format error: not a pdf or corrupted", and nothing is displayed.


So I tried this:

<cfsavecontent variable="sqlResult">
        <cfdocument format="pdf"><cfoutput>#sqlResult#</cfoutput></
cfdocument>
</cfsavecontent>
<cfheader name="Content-Disposition" value="attachment; filename=""sql
results.pdf""">
<cfcontent reset="yes" type="application/pdf; charset=UTF-8"
variable="#sqlResult#">

That code brings up Save/Open, but the filename is the name of the cfm
page, with a .cfm extension, in spite of the cfheader call. Choosing
Open shows the document correctly.


This is an odd combination of results, leaving me unclear about what's
missing to get a functional pdf with the right filename.

- The parameters for cfdocument in open bd aren't fully documented in
the wiki tag reference, but there's no mention that 'name' isnt'
supported. Is it?

- If not, is that the recommended way to use it, to end up with the
pdf in a variable (as opposed to a file)?

- cfheader isn't listed in the tag reference. Is it supported? (In
general, are only tags listed in the wiki tag reference supported?) Is
that the recommended syntax to provide a filename?


Thanks very much for any help,
e

--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to