dqzve68846 2018-10-03 11:41
浏览 48

如何将lavachart导出为PDF

I'm using http://lavacharts.com/ to display charts on website. But I couldn't export the laravel view with lavacharts to PDF.

I used following code

$lava = new Lavacharts; // See note below for Laravel

        $reasons = $lava->DataTable();

        $reasons->addStringColumn('Messages')
                ->addNumberColumn('Percent')
                ->addRow(['Delivered SMS', $messageCount['successCount']])
                ->addRow(['Failed SMS', $messageCount['failedCount']])
                ->addRow(['Pending SMS', $messageCount['pendingCount']])
                ->addRow(['Others', $messageCount['othersCount']]);

        $lava->DonutChart('IMDB', $reasons, [
            'title' => 'SMS Broadcast stats'
        ]);

        view()->share('broadcasts', $broadcasts);
        view()->share('lava', $lava);
        view()->share('messageCount', $messageCount);
        view()->share('broadcastPaginated', $broadcastPaginated);
        \PDF::setOptions(['dpi' => 150]);
        $pdf = \PDF::loadView('manager.sms.broadcasts-pdf');
        return $pdf->download('Invoice.pdf');

The PDF library I'm using is

https://github.com/barryvdh/laravel-snappy

https://github.com/KnpLabs/snappy

Following is the Error I got when trying to execute above page

The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% QSslSocket: cannot resolve CRYPTO_num_locks QSslSocket: cannot resolve CRYPTO_set_id_callback QSslSocket: cannot resolve CRYPTO_set_locking_callback QSslSocket: cannot resolve sk_free QSslSocket: cannot resolve sk_num QSslSocket: cannot resolve sk_pop_free QSslSocket: cannot resolve sk_value QSslSocket: cannot resolve SSL_library_init QSslSocket: cannot resolve SSL_load_error_strings QSslSocket: cannot resolve SSLv3_client_method QSslSocket: cannot resolve SSLv23_client_method QSslSocket: cannot resolve SSLv3_server_method QSslSocket: cannot resolve SSLv23_server_method QSslSocket: cannot resolve X509_STORE_CTX_get_chain QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf QSslSocket: cannot resolve SSLeay QSslSocket: cannot call unresolved function CRYPTO_num_locks QSslSocket: cannot call unresolved function CRYPTO_set_id_callback QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function sk_num [==========> ] 18% QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function 
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分