Skip to main content
Participating Frequently
July 31, 2007
Question

Create multi page PDF

  • July 31, 2007
  • 2 replies
  • 1498 views
Is it possible using the the CFPDFform tag to create a multi-page PDF file from a single page PDF file with a couple form fields for every record in a query?

I realize you could create a single PDF file for every record and then merge them all together using CFPDF.
I was just hoping there's a more elegant solution (there are 1000's of records).

Cheers

Simon
    This topic has been closed for replies.

    2 replies

    Inspiring
    July 31, 2007
    Use the following

    <cfdocumentitem type = "pagebreak"/>


    Ken
    sromanskiAuthor
    Participating Frequently
    August 1, 2007
    Currently when I run the following I get a single page PDF file populated with the information from the last record of the query. Using <cfdocumentitem type = "pagebreak"/> makes sense but I'm not sure where it would go relative to the code below. I also will need a <cfdocument> tag if using <cfdocumentitem> and again I'm not sure where which tag should sit inside which.

    <cfquery name="getEmpInfo" datasource="fai">
    select firstname, lastname
    from employee
    </cfquery>

    <cfpdfform action="POPULATE" destination="E:\www\output.pdf" source="E:\www\form.pdf" overwrite="yes" overwritedata="no">

    <cfloop query="getEmpInfo">
    <cfpdfsubform name="form1">
    <cfpdfformparam name="School_Administrator_Activation_Code" value="#getEmpInfo.firstname#">
    <cfpdfformparam name="School_Code" value="#getEmpInfo.lastname#">
    </cfpdfsubform>
    </cfloop>
    </cfpdfform>
    Inspiring
    July 31, 2007
    I'm not familiar with that tag but I'm sure that a combination of cfoutput, cfdocument and cfdocumentitem would work.