Copy link to clipboard
Copied
I am trying to insert data into a pdf for an order form.
The initial form part works fine (PO number, name, company, etc).
I am running onto difficulty populating the subform details though. I have a table wrapped in a subform called "details". The table is called "table1". Then the row with the row data is called "row1".
a) How should I set this up in livecycle for all of the rows to be taken into account?
b) And what should my data for each row look like (I'm using coldfusion)?
for part b) should the data look like this?
pdfDescription: apples
pdfQuantity: 2.0000
pdfDescription: oranges
pdfQuantity: 5.0000
or like this?
pdfDescription1: apples
pdfQuantity1: 2.0000
pdfDescription2: oranges
pdfQuantity2: 5.0000
Copy link to clipboard
Copied
My recommendation would be to use CFPDFFORM to read the structure of the form, use CFDUMP to show you that structure, then you can easily address the structure of the form.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Copy link to clipboard
Copied
I did this and it looks as I expected. here it is
my cf code looks like this (in my sample database the are 2 records. only the 1st record is showing in the pdf):
<cfpdfform source="pdf_templates\pdfOrderTemplate3.pdf"<!--- my template pdf with fields --->
destination="pdf_templates\Client-Order-Dynamic-#getClientOrder.ClientOrdersID#.pdf" <!--- this will be created --->
action="populate"
overwrite="yes"
>
<!--- <cfpdfsubform name="form1"> --->
<cfpdfsubform name="Page1">
<cfpdfsubform name="Header">
<cfpdfformparam name="pdfClientName" value="#getClientOrder.ClientName#" />
<cfpdfformparam name="pdfOrderDate" value="#getClientOrder.OrderDate#" />
<cfpdfformparam name="pdfClientCompany" value="#getClientOrder.ClientCompany#" />
<cfpdfformparam name="pdfBigTotal" value="#grandTotal.BigTotal#" />
</cfpdfsubform>
<cfpdfsubform name="details">
<cfpdfsubform name="Table1">
<cfloop from="1" to="#getClientOrderDetails.recordCount#" index="i">
<cfpdfsubform name="Row1" index = "#i#">
<cfpdfformparam name="pdfDescription" value="#getClientOrderDetails.ItemDescription#">
<cfpdfformparam name="pdfQuantity" value="#getClientOrderDetails.ItemQuantity#">
<cfpdfformparam name="pdfUnitPrice" value="#getClientOrderDetails.ItemUnitPrice#">
<cfpdfformparam name="pdfItemTotal" value="#getClientOrderDetails.ItemTotal#">
</cfpdfsubform>
</cfloop>
</cfpdfsubform>
</cfpdfsubform>
</cfpdfsubform>
</cfpdfform>
Copy link to clipboard
Copied
Check the example here:
http://forums.adobe.com/thread/711389?tstart=0
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Copy link to clipboard
Copied
seen that example already. my structure is pretty similar.
if you see something wrong with my structure please let me know.
Copy link to clipboard
Copied
Maybe there's something different with the actual form. Is the table configured to have repeatable rows?
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Copy link to clipboard
Copied
yes it is....but I do think you're right, something is not aligning between cf and the pdf row fields.
I could send you the pdf via email for testing/comparing variable names.
Copy link to clipboard
Copied
Sure, go ahead. I won't get to look at it today, though.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Copy link to clipboard
Copied
I finally got this to work. I had to set overwritedata=”yes” in coldfusion. That was it. thank you for your help.
Shawn
Copy link to clipboard
Copied
I finally got this to work. I had to set overwritedata=”yes” in coldfusion. That was it. thank you for your help.
Shawn
Copy link to clipboard
Copied
I'm sorry it took me so long to respond, I didn't have time to look at the PDF this week.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.