1

I'm trying to export fusionChart Images on the Server Without Rendering in a Browser.. i would like to use the image in tcpdf

i followed the example here http://www.fusioncharts.com/blog/2013/03/how-to-save-charts-as-images-at-server-side/

    < ?php
    $webpageURLWithChart = "mychart.php";
    $outputImageFileName = "savedImage.png";
    $delay = 500;
    $shellout = shell_exec("wkhtmltoimage --javascript-delay $delay $webpageURLWithChart $outputImageFileName" );
    echo $shellout;
    ?>

mychart.php is working fine but image is not generated

path is set C:\Program Files\wkhtmltopdf

any help is much apreciated

gtroop
  • 295
  • 4
  • 13

2 Answers2

1

Try to keep images and files inside your project folder and give the source names correctly.

Viraj Amarasinghe
  • 911
  • 10
  • 20
0

Finally Got it..we have to set the full url for $webpageURLWithChart

  < ?php
    $webpageURLWithChart = "http://localhost/test/mychart.php";
    $outputImageFileName = "savedImage.png";
    $delay = 500;
    $shellout = shell_exec("wkhtmltoimage --javascript-delay $delay $webpageURLWithChart $outputImageFileName" );
    echo $shellout;
    ?>
gtroop
  • 295
  • 4
  • 13