Skip embedding and use cfsavecontent to capture the cfpdfform output in a variable.
<cfpdfform action="populate" ... (omit destination) ... >
Is it just not possible to create a pdf variable from a cfpdfform embedded in a cfdocument?
Yes, you can. Though you need to use at least on cfdocumentsection and apparently it must be before the cfpdfform tags or it does not work. At least not in my tests.
That worked, but I'm still perplexed as to why it would not work within the cfdocument tag. Thanks for your help!
I do not normally use embedding, but it did work for me as long as the cfdocumentsection was in the right place. But, it probably would not be a good solution for this case anyway, because cfdocumentsection adds a page break. So you would have a blank first page.
When I run the following code (in CF8 & CF9), the cfsavecontent tag is ignored (output is written directly to browser):
<cfpdfform source="#expandPath('/path/to/MyPDF.pdf')#" action="populate" />
Just curious.. so the cfsavecontent tag was honored for you (output is trapped in variable, and not directly written to browser)?
UPDATE: It seems "name" is not actually a _documented_ attribute of cfpdfform (only cfpdf). Aaron mentioned this on another forum. If "name" really is undocumented/unsupported, I probably would not use it. The issue is mentioned in the bug database #75195. The current status is "Closed", but I do not know the final outcome (ie fixed/not-fixed.
Just curious.. so the cfsavecontent tag was honored for you
(output is trapped in variable, and not directly written to browser)?
I think that was just non-tested psuedo-code. (I am not sure why I did not just suggest using the "name" attribute to capture the output in a variable..) But that does work on CF9
In my testing CFPDFForm output doesn't get captured by CFSaveContent.
Wow, this thread is almost two years old... I do not remember the chain of events but does not the last comment mention that being non-tested psuedo-code? ;-)
I realized I was resercting an old thread, but seeing as it had come up in my search and I had tested the code I wanted to confirm that it didn't work so someone else wouldn't need to expend the time testing. Figured feed back was a reasonable community expectation.
Fair enough. Though you might post your full version number as behavior can vary between patches (too bad I did not do that in the earlier comments..).
My testing was performed in CF 9,0,1,274733
Thanks. FWIW I can confirm your confirmation ;-) Cfsavecontent does not capture the output under 9.0.1.