As I also needed to make multiple PDF documents merge, I ended up doing the following. Many thanks to Adam Cameron for providing the solution to my initial issue.
- In the template file, I use the
<cfdocument>
tag with thename
attribute to save the PDF in a variable (thanks to Adam Cameron for this) - Then, I store all the PDF documents in an array in their binary format
- In my view, I merge the PDF documents together by using
<cfpdf>
'smerge
action, and using a cfloop, to loop over the array, inside it. - Finally, I display the content by using
<cfcontent>
and using the variable attribute withtoBinary(myPdf)
This got me to where I am.