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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2862
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15