• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get result query to print PDF pages, e.g.invoices?

Guest
Dec 17, 2010 Dec 17, 2010

Copy link to clipboard

Copied

Greetings

I have set up the query results to fill an html page with data which is an invoice to be sent out to lesees.

Using the cfdocument tag, I can get a printable PDF version with the mailing address positioned to show in a window envelope, etc., but only one at a time.

There is a way to loop through all the records (in this case, over 1000) and print out the whole lot (single page invoices in PDF) with one command, I assume?

I have looked into cfprint and cfreport, but don't see how these could be used in this situation?

Thanks for any help with this...

TOPICS
Advanced techniques

Views

527

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 17, 2010 Dec 17, 2010

Copy link to clipboard

Copied

The simplest idea that pops into my head is:

<cfloop>

<cfdocument>

<cfprint>

closing tags

I've neber actually tried this.  What happened when you did?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2010 Dec 18, 2010

Copy link to clipboard

Copied

LATEST

Copy all 1000 invoces as one PDF document, then print. Something like this

<cfdocument format="PDF" name="invoices">
<html>
<cfloop through query or array or list, and so on, to get each address>
<!--- Text containing a dynamically generated address goes here --->
</cfloop>
<!--- Starts a new page for each pass of the loop --->
<cfdocumentitem type="pagebreak" />
</html>
</cfdocument>

<cfprint source="invoices" printer="\\s1001prn02\NTN-2W-HP_BW02">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation