making a page use cfdocument or not

2007-04-18 Thread Chad Gray
I would like to make a page that will either be displayed as a PDF using CFDocument or as plan old HTML. I cant seem to do the below I get the error: The end tag /cfdocument encoutered on line 6 at column 11 requires a matching start tag. cfif URL.Format EQ PDF cfdocument format=pdf

RE: making a page use cfdocument or not

2007-04-18 Thread Ian Skinner
This was on the Adobe forums just yesterday. The solution is here: !--- Must save the stuff to be converted to a PDF as a variable --- cfsavecontent variable=content Cfdump var=#get_slice# /cfsavecontent !--- Execute this for PDF generation --- cfif URL.convert_to_PDF EQ Yes cfdocument

Re: making a page use cfdocument or not

2007-04-18 Thread Jake Pilgrim
Ian keyed in on the solution here. In short - you can't have a condition around just the CFDOCUMENT starting and ending tags; the condition needs to wrap the entire code block. From what I experienced CFdocument seems to always run whether it is wrapped in a condition or not(seems to execute