This content has been marked as final. Show 5 replies
The 2nd question is pretty straightforward, somewhere you use cfoutput.
Printing automatically is a bit more involved. You need the printer in question to be installed on your server. Then you need to run cfexeucte to print the job. What you execute depends on the OS of your server.
I'm not sure that the second question is straightforward. I have tried CFOUTPUT, but you can't nest CFDocuments within a cfoutput statement. My thought is the only way to do this is to call a separate cfc.
The original question had to do with creating PDF reports based on records in a table. That's pretty straightforward.
What's all this about nesting CFDocuments?
I use cfdocument to print out personnel biographies. You select a user, click print, and bam, a .pdf is generated (sometimes they are 2 or 3 pages long, depending upon the content in their sql record). What I need to do is allow a user to pick a few biographies, and click print and generate one pdf with multiple biographies. The problem I have is dealing with page numbering. I need the page numbering to be based on ther person and not the overall file. (If a person's bio is two pages, I need to print "continued" on their second page. The problem I have is that EVERY person after page one is essentially not the first page, so they all get the continue message.
What you probably need to do is generate each bio individually with the
<cfdocument...> tag just the way you want them. And then use some of
the advanced <cfpdf...> functionality that allows you to append two or
more individual PDF's into a single large PDF.
Here are some resources that describe some of the <cfpdf...> functionality.