1

我正在尝试在服务器上导出 fusionChart 图像而不在浏览器中渲染.. 我想在 tcpdf 中使用图像

我按照这里的例子 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 工作正常,但未生成图像

路径设置 C:\Program Files\wkhtmltopdf

非常感谢任何帮助

4

2 回答 2

1

尝试将图像和文件保存在项目文件夹中,并正确给出源名称。

于 2017-07-08T15:39:12.940 回答
0

终于明白了..我们必须为 $webpageURLWithChart 设置完整的 url

  < ?php
    $webpageURLWithChart = "http://localhost/test/mychart.php";
    $outputImageFileName = "savedImage.png";
    $delay = 500;
    $shellout = shell_exec("wkhtmltoimage --javascript-delay $delay $webpageURLWithChart $outputImageFileName" );
    echo $shellout;
    ?>
于 2017-07-08T15:48:40.423 回答