tracker issue : CF-4205759

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

Images don't appear in slides created by cfpresentation

| View in Tracker

Status/Resolution/Reason: To Track//NeedMoreInfo

Reporter/Name(from Bugbase): David S. / ()

Created: 10/31/2019

Components: Document Management, Presentation

Versions: 2018

Failure Type: Non Functioning

Found In Build/Fixed In Build: 2018,0,05,315699 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:
Images added to html for processing by CFPresentationslide do not appear in the finished file
Steps to Reproduce:
create *.png images from CFcharts (3 of them)
use cfsavecontent to put img tags, with src set  the absolute paths to image files, in variables.
under cfpresentationslide tag, use cfoutput to place the cfsavecontent variables (holding <img.. tags) in html table.
a <cfabort> placed before the closing cfpresentationslide tag will show that the images appear in the table.
cfpresentation tag creates the ppt file and saves it to a docs directory. 
Actual Result:
When downloaded, or copy and pasted out of the docs directory, the the images appear on the slide as 3 white squares with little red x's. (broken links)
Expected Result:
This works perfectly in coldfusion 2016. I expect to see the chart graphics embedded in the slide.
Any Workarounds:
Haven't found one yet.



I was mistaken about the windows server being used, it is window server 2016.
Comment by David S.
31692 | October 31, 2019 07:58:22 PM GMT
I found a workaround for this from a blog post by Rupesh Kumar from 2005. this function he wrote is key: <cffunction name="localUrl" > <cfargument name="file" /> <cfset var fpath = ExpandPath(file)> <cfset var f=""> <cfset f = createObject("java", "")> <cfset f.init(fpath)> <cfreturn f.toUrl().toString()> </cffunction> then I use localUrl() against the file path for the images, in the src attribute of the img tag. <cfset filepath = #localUrl("/brief/img/#varTimestamp##loopTotal#chart1.png")#> Anyway, this works perfectly.
Comment by David S.
31693 | November 01, 2019 05:16:05 PM GMT
<cfsavecontent variable="ppt_chart1"><img src="#filepath#" height="250" width="250"></cfsavecontent>
Comment by David S.
31694 | November 01, 2019 05:17:24 PM GMT
David, wouldn't it be easier if you just shared the relevant code snippets.... if for some reason you cant, please elaborated on the following: "create *.png images from CFcharts (3 of them) use cfsavecontent to put img tags, with src set the absolute paths to image files, in variables." specifically, how you are persisting the charts in file before apparently pointing to them in img tag.
Comment by Piyush K.
31888 | November 27, 2019 01:33:45 PM GMT