0

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)#">
1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by mijorog
0

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>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.