我正在使用cfdocument將表格內容保存爲PDF。我正在使用cfoutput爲查詢中的每一行生成一個。每x行,我想強制分頁符,插入表格的標題行,並繼續循環查詢。發生什麼事情是在表和表之間插入了幾個分頁符,並且它完全忽略了分頁符的位置。標籤不應該在桌子內工作嗎?我的代碼如下:CFdocumentitem Pagebreak不起作用
<cfdocument format="pdf" orientation="landscape">
<h1>Cumulative Daily Report</h1>
<table id="displayTable" cellspacing="0">
<tr>
<th>Specialist</th>
<th>Asmnts</th>
<th>Avg Length</th>
<th>Day 2 Returns</th>
<th>QPRs</th>
<th>NCAs</th>
<th>Asmnts</th>
<th>Avg Length</th>
<th>Day 2 Returns</th>
<th>QPRs</th>
<th>NCAs</th>
<th># of Days</th>
<th>AEU/th>
<th>Asmnts</th>
<th>QPRs</th>
<th>NCAs</th>
<th># of Days</th>
<th></th>
</tr>
<cfoutput query="qryDisplay">
<cfif qryDisplay.currentRow MOD (rowsPerPage + 1) EQ 0>
<cfdocumentitem type="pagebreak"></cfdocumentitem> <tr>
<td colspan="18">Column Header Row here</td>
</tr>
</cfif>
<tr>
<td>#SpecialistName#</td>
<td>#numberFormat(nSixNumAssess, ",")#</td>
<td>#numberFormat(nSixAvgLength, ",")#</td>
<td>#numberFormat(nSixDay2Rets, ",")#</td>
<td>#numberFormat(nSixQPRs, ",")#</td>
<td>#numberFormat(nSixNCAs, "_._")#</td>
<td class="contrastBG">#numberFormat(nRtscNumAssess, ",")#</td>
<td class="contrastBG">#numberFormat(nRtscAvgLength, ",")#</td>
<td class="contrastBG">#numberFormat(nRtscDay2Rets, ",")#</td>
<td class="contrastBG">#numberFormat(nRtscQPRs, ",")#</td>
<td class="contrastBG">#numberFormat(nRtscNCAs, "_._")#</td>
<td>#numberFormat(nSixNumDaysWorked, ",")#</td>
<td class="bold">#numberFormat(nSixAEU,"_.__")#</td>
<td class="contrastBG">#numberFormat(nWecareNumAssess, ",")#</td>
<td class="contrastBG">#numberFormat(nWecareQPRs, ",")#</td>
<td class="contrastBG">#numberFormat(nWecareNCAs,"_._")#</td>
<td class="contrastBG">#numberFormat(nWecareNumDaysWorked, ",")#</td>
<td class="contrastBG bold rightBorder">#numberFormat(nWecareAEU,"_.__")#</td>
</tr>
</cfoutput>
</table>
</cfdocument>
我不認爲這是可能的。嘗試使用像wkhtmltopdf這樣的第三方軟件。 –
你在使用什麼版本的ColdFusion? –
使用CF10 – Cmaso