tracker issue : CF-3725010

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

CFDocument duplicates transparent PNG images of equal dimensions

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/ThirdParty

Reporter/Name(from Bugbase): James Moberg / James Moberg (James Moberg)

Created: 03/17/2014

Components: Document Management, PDF generation

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: PublicBeta /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: CFDocument duplicates transparent PNG images of equal dimensions

Steps to Reproduce:
<cfloop list="175,200,225" index="thisWidth">
	<cfloop from="1" to="3" index="thisImage">
		<cfset imgdata = imagenew("", 175, 130, "argb")>
		<cfset imagesetdrawingcolor(imgdata, "##000000")>
		<cfset objfont = {size = "9", font = "Arial"}>
		<cfset imagesetantialiasing(imgdata,"on")>
		<cfset imagedrawtext(imgdata, "Test#thisWidth#.#thisImage#", 0, 8, objfont)>
		<cfset imagewrite(imgdata, "test#thisWidth#_#thisImage#.png")>
	</cfloop>
</cfloop>


<cfdocument format="PDF">
	<cfdocumentsection>
		<cfoutput>
			<cfloop list="175,200,225" index="thisWidth">
				<cfloop from="1" to="3" index="thisImage">
					<img src="test#thisWidth#_#thisImage#.png" width=#thiswidth# height=130 style="border:1px solid ##000000;">
				</cfloop><br>
			</cfloop>
		</cfoutput>
	</cfdocumentsection>
</cfdocument>

Actual Result:  Only 3 unique PNG images are displayed when either FlashPaper or PDF is generated.

Expected Result: The 9 unique PNG images saved to the hard drive and rendered in the HTML.

Any Workarounds:  To get a transparent PNG to work?  None. Don't use CFDocument.  Use wkhtmltopdf http://wkhtmltopdf.org/

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

Watson Bug ID:	3725010

External Customer Info:
External Company:  
External Customer Name: Jamo
External Customer Email:  
External Test Config: My Hardware and Environment details: I'm using multiple versions of Windows & this bug occurs in ColdFusion 8, 9, 10 & 11.  I didn't want to report a "duplicate bug" or report it in versions of ColdFusion that are not longer being actively supported, but please consider fixing this in 9 & 10 as it's what I'll probably be using for the next couple of years.

Attachments:

Comments:

Please let me know if I also need to report this same exact bug in ColdFusion 9 & 10. Thanks.
Comment by External U.
13060 | March 24, 2014 08:25:25 PM GMT
That would not be required. Thanks for offering to do the same though.
Comment by Vamseekrishna N.
13061 | April 09, 2014 09:52:09 PM GMT
Just adding my analysis the issue is only reproducible if the image type is png and the drawing color is #000000. If we set the drawing color to #000001 the issue is not reproducible. Its kinda strange. Issue happens with only transparent png images.
Comment by S V.
13062 | August 12, 2014 07:50:09 AM GMT
Why is this been flagged as "Closed | Third Party"? The "steps to reproduce" use documented ColdFusion tags and functions. The first part of the script does generate 9 unique images and CFDocument fails to display them properly. Is the dependent library, iText, the third-party? If so, these issues could be fixed by updating third-party libraries with each ColdFusion release (especially since this fails to work in CF 8, 9, 10 & 11) Does iText fail to work correctly when used independently of ColdFusion? If so, please provide sample code that it can proven that it's definitely an iText issue. (Please test newer version of iText too. If newer third-party libraries work, when will ColdFusion be updated to use them?)
Comment by External U.
13063 | November 13, 2014 07:22:04 AM GMT
I found a workaround. See https://forums.adobe.com/thread/2004777
Comment by External U.
13064 | December 06, 2015 10:34:40 AM GMT