tracker issue : CF-3846110

select a category, or use search below
(searches all categories and all time range)
Title:

cfhtmltopdfitem errors when inside CFLOOP

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Erik Voldengen / Erik Voldengen (Erik Voldengen)

Created: 10/31/2014

Components: Document Management, PDF Generation (CFHTML2PDF)

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final / CF11 Update5

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 8.1 Update 2 x(64)

Vote Count: 1

Listed in the version 11.0.05.293506 Issues Fixed doc
Problem Description:
cfhtmltopdf with cfhtmltopdfitem works fine, but inside a loop and iterated more than once results in an error:

Error in handling header footer related attributes. 


Steps to Reproduce:

<cfloop from="1" to="10" index="i">
	<cfhtmltopdf destination="#createUUID()#.pdf" overwrite="true">
	     <cfhtmltopdfitem type="header">header</cfhtmltopdfitem>
	     THIS IS A TEST DOCUMENT
	     <cfhtmltopdfitem type="footer" >footer</cfhtmltopdfitem>
	</cfhtmltopdf>
</cfloop>




Actual Result:

Error in handling header footer related attributes. 

Expected Result:

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3846110

External Customer Info:
External Company:  
External Customer Name: erikv
External Customer Email:  
External Test Config: Windows/CF11

Attachments:

  1. November 01, 2014 00:00:00: 1_test4.cfm

Comments:

Workaround: <cffunction name="makePDF" returntype="boolean"> <cfargument type="string" name="fileAppend" default="#randrange(10,99)#" /> <cfoutput> <cfhtmltopdf destination="./test#arguments.fileAppend#.pdf" overwrite="true"> <cfhtmltopdfitem type="header">header</cfhtmltopdfitem> THIS IS TEST DOCUMENT NUMBER #i#. <cfhtmltopdfitem type="footer">footer</cfhtmltopdfitem> </cfhtmltopdf> </cfoutput> <cfreturn true /> </cffunction> <cfloop from="1" to="10" index="i"> <cfset makePDF("#i#") /> </cfloop>
Comment by External U.
10336 | November 03, 2014 03:53:12 PM GMT
Changed the release value of 'Opacity' to its default value. Earlier it was being set to -1, which caused the loop to crash in its 2nd iteration
Comment by Nikhil S.
10337 | November 19, 2014 06:12:00 AM GMT
+1 ......................
Vote by External U.
10341 | November 26, 2014 06:14:45 AM GMT
This issue is fixed and fix will be available with the upcoming update of ColdFusion 11.
Comment by Nimit S.
10338 | January 12, 2015 04:58:35 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
10339 | February 20, 2015 09:24:36 AM GMT
Unable to test this fix in CF11 Update 5 b/c CF-4031773 (Update 5 broke PDFg). Thanks!, -Aaron
Comment by External U.
10340 | September 05, 2015 03:20:29 AM GMT