erikTsomik
asked on
Populate pdf with Coldfusion
I have a PDF template. And I am using Coldfusion and database to get the data. Now i need to take that data and populate the PDF. the data size is different so sometimes it is 1 page and sometimes 1+.
My template is only 1 page. How can I use the same template to say add another page
My template is only 1 page. How can I use the same template to say add another page
ASKER
Thank you. I have the screen shot of my form
And the assosiated code
And the assosiated code
<cfpdfform source="..\_pdf\dts100.pdf"
destination="..\_pdf\Client-Order-Dynamic.pdf" <!--- this will be created --->
action="populate"
overwrite="yes"
overwritedata="yes"
>
<cfpdfsubform name="topmostSubform">
<cfpdfsubform name="subForm1">
<cfpdfformparam name="school_name" value="Construct., Inc" />
</cfpdfsubform>
</cfpdfsubform>
</cfpdfform>
What's the result when you populate the complete form?
ASKER
I have decided to populate with xmldata.
where ClassInfo.numPages is the number of pages
I gave the subform a unique name for each page but only populate first page
<cfpdfform action="populate" source="#Request.PDFLoc#\#Arguments.docFileName#" xmldata='<?xml version="1.0" encoding="UTF-8"?>
<topmostSubform>
<cfoutput >
<cfloop from="1" to="#ClassInfo.numPages#" index="i">
<SubForm"#i#">
<school_name>#ClassInfo.school_name#</school_name>
<TextField1>#ClassInfo.school_code#</TextField1>
<preparer>#ClassInfo.preparer#</preparer>
</SubForm"#i#">
</cfloop>
</cfoutput>
</topmostSubform>' overwritedata="yes" />
where ClassInfo.numPages is the number of pages
I gave the subform a unique name for each page but only populate first page
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/26528588/not-getting-multiple-rows-in-subform-with-cfpdfsubform.html