attach javascript chart to email


I created a chart in javascript (chart.js) using values from previous answers. displaying works fine but I would like to attach it to a “send email” action 

When I try to use the following custom script I recieve a pdf attachment but it is just one blank page.


%%contents = sgapiGetValue(55); //javascript action ID is 55
%%pdf = sgapiHTMLTOPDF(%%contents);

%%attachment[’filename.pdf’] = %%pdf;

//Attach to existing send email action (ID 108)


 any ideas? thanks a lot!

Joshua commented

    I am not a PHP scripting expert, but I have used the attach a certificate script in the SurveyGizmo Developer Resources for several different projects.  This script creates a certificate that is then attached as a pdf file to an email. The bulk of that script actually builds the HTML file (head, body) that is then converted to a PDF – these are steps that your script seems to lack.

    Hope this is helpful!


    Jim W (Moderator) edited answer


      Question stats

      • Active
      • Views6446 times
      • Answers1 answer
      • Followers1 follower