You're looping over the PDF generating code in its entirety. Would you not
need to place the cfoutputs inside the cfdocument tags, top and bottom?

Adrian

-----Original Message-----
From: Gary Strommen [mailto:[EMAIL PROTECTED]
Sent: 22 June 2007 18:06
To: CF-Newbie
Subject: cfdocumentitem pagebreak


I have a certificate that I am printing.  I am pulling record information
through a query and that information is placed in specific location and
turned into a PDF.  When printed, the information lines up exactly where it
should through the use of layered objects.  (The graphics already exist on
the piece of paper so it is vital that the text lines up where it needs to.)
This works great when I am creating a PDF one record individually.  However,
when I try to create a PDF with multiple pages, I get all the information on
one page.  (Ideally, there will be one record per page.)  When I try using
the pagebreak feature, the PDF is created with two pages, the first page
blank and the second page has multiple entries - overlapping each other.

Any suggestions is greatly appreciated.  Here is the relevant code:

<cfset tcName = "xxx">
<cfset certNo = "xxx">

<cfoutput query="qGetCertData">
   <cfdocument format="pdf" pagetype="letter" orientation="landscape"
fontembed="yes" backgroundvisible="no" >
      <div id="Layer1" style="position:absolute; left:400px; top:450px;">
         <cfoutput><font size="7">#qGetCertData.certName#</font></cfoutput>
      </div>

      <div id="Layer2" style="position:absolute; left:400px; top:520px;">
         <cfoutput><font size="7">#qGetCertData.className#</font></cfoutput>
      </div>

      <div id="Layer3" style="position:absolute; left:900px; top:520px;">
         <cfoutput><font size="7">#DateFormat(qGetClasses.startingDate,
"m/d/yyyy")#</font></cfoutput>
      </div>

      <cfif qGetClasses.faculty IS "xxx">
         <div id="Layer4" style="position:absolute; left:400px; top:515px;">
            <img src="xxx"/>
         </div>
      </cfif>

         <!--- other if statements for other members of faculty
               removed here for simplicity --->

      <div id="Layer5" style="position:absolute; left:400px; top:665px;">
         <cfoutput><font size="7">#tcName#</font></cfoutput>
      </div>

      <div id="Layer6" style="position:absolute; left:925px; top:740px;">
         <cfoutput><font size="7">#certNo#</font></cfoutput>
      </div>
      <cfdocumentitem type="pagebreak" />
   </cfdocument>
</cfoutput>

I heard that the placement of the pagebreak is picky so I also tried the
page break at the top but that had the same result.  Thanks in advance.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2866
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to