coldfusion - Cfdocumentitem pagebreak during loop gives extra blank page -



coldfusion - Cfdocumentitem pagebreak during loop gives extra blank page -

i using cf9, , coldbox. doing looping through query, , assigning page break @ end using cfdocumentitem pagebreak. however, gives me blank page @ end. it's pretty much driving me crazy, defer expert advice.

<cfdocument format="pdf" overwrite="yes" localurl="yes" pagetype = "letter"> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head></head> <body> <cfquery name="receipts" dbtype="query"> select distinct id_number rc.rc1 </cfquery> <cfoutput> <cfloop query="receipts"> <!--- removed brevity ---> <cfdocumentitem type="pagebreak" /> </cfloop> </cfoutput> </body> </html> </cfdocument>

if don't want display pagebreak after lastly item in loop have explicitly that. if current row of query not lastly row in query display page break.

<cfloop query="receipts"> <cfif receipts.currentrow neq receipts.recordcount> <cfdocumentitem type="pagebreak" /> </cfif> </cfloop>

coldfusion coldfusion-9 cfdocument

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -