tags:

views:

46

answers:

2

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
+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
FYI, cfpdf tags are made possible by iText: http://www.itextpdf.com/itext.php
Henry
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.
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
Cool, I'll try that. Thanks again Henry!
Mike G.
Btw if this works for you, time to mark it the correct answer. :)
Henry