What is the best way to cfoutput query results over a PDF? I need to be able to place the results, ie name, address, etc. over an existing PDF letter for print.
A:
Found this on google: http://www.pdfcode.com/viewtopic.php?f=2&t=2
(ABCPdf & ColdFusion)
I use ABCPDF for asp.net websites. I'm not sure how popular it is for ColdFusion.
Larry Flewwelling
2010-09-14 18:49:09
+4
A:
Make "name, address, etc." into fields, then fill in with <cfpdfformparam>
.
see: http://cfpdf.blogspot.com/2008/04/populate-and-merge-multiple-pdf-forms.html
Henry
2010-09-14 19:03:40
FYI, cfpdf tags are made possible by iText: http://www.itextpdf.com/itext.php
Henry
2010-09-14 19:52:59
Hi Henry, Thank you for your help. I was able to get this to work with your suggestion. Would you happen to know how I can loop through my results and have this PDF display 5 times for my 5 results? <cfloop query="report"><cfoutput><cfpdfform action="populate" source="#ExpandPath('form/Overdraft.pdf')#"> <cfpdfformparam name="Account" value="#f5#" ><cfif report.f15 eq 'Y'><cfpdfformparam name="Y" value="x"><cfelse> <cfpdfformparam name="N" value="x"> </cfif> </cfpdfform> </cfoutput></cfloop>
Mike G.
2010-09-14 20:14:43
create 5 individual PDFs, then flatten and merge them into one PDF with 5 pages? Or use <cfdocument> to create the PDF from scratch.
Henry
2010-09-14 20:37:24
Cool, I'll try that. Thanks again Henry!
Mike G.
2010-09-14 21:21:32
Btw if this works for you, time to mark it the correct answer. :)
Henry
2010-09-15 17:35:39