【问题标题】:fusioncharts and wkhtmltoimagefusioncharts 和 wkhtmltoimage
【发布时间】:2017-07-08 23:48:40
【问题描述】:

我正在尝试在服务器上导出 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

非常感谢任何帮助

【问题讨论】:

    标签: php fusioncharts wkhtmltoimage


    【解决方案1】:

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

    【讨论】:

    • 全部设置在 D:\wamp\www\test\
    • 回显图片路径并手动遍历路径或使用浏览器检查图片路径是否正确。
    • 谢谢你终于明白了..我们必须为 $webpageURLWithChart 设置完整的 url.. 我发布了我的答案
    【解决方案2】:

    终于明白了..我们必须为 $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;
        ?>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-04
      • 1970-01-01
      • 2011-05-05
      • 2012-10-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多