I can create the CFCHART just fine and also save it to a folder on my server just fine. But when I try to merge it into pdf I get

An error occurred during the MERGE operation in the cfpdf tag.
Error: Invalid Document C:/inetpub/wwwroot/Clients/visionmanagementservices.net/tempgraphs4/charts.jpg specified for source or directory.

I am clueless as to where to go to fix this. Or maybe there is an easier way to acomplish this. My server runs CF 9. Thanks in advance!

<cfchart showxgridlines="yes" title="Accucheck Report for #res.FirstName# #res.LastName#" format="jpg" scalefrom="100" scaleto="250" chartheight="500" chartwidth="800" tipbgcolor="##FFFFFF" xaxistitle="Date / Time" name="charts">
             .....          
               </cfchart>

 <cffile action="write"
 	file="#ExpandPath("./tempgraphs#Session.facility#/charts.jpg")#"
        output="#charts#"
	charset="ISO-8859-1">

This is a different page

<cfpdf source="tempgraphs#Session.facility#/charts.jpg" action="write" name="addchart">
<cfpdf action="merge" name="mergedpdf">
    <cfpdfparam source="dates">
    <cfpdfparam source="scale">
    <cfpdfparam source="addchart">
    </cfpdf>
<cfcontent type="application/pdf" reset="true" variable="#toBinary(mergedpdf)#">

So I figured this out. Needed to use cfdocument and specify what type of image this is with the mimetype.

<cfdocument format="pdf" srcfile="#ExpandPath("./tempgraphs#Session.facility#/charts.jpg")#" mimetype="image/jpeg" name="thischart" ></cfdocument>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.