Warning: Failed to load http://www.gstatic.com/charts/loader.js (ignore) for generating graph using laravel snappy

36 Views Asked by At

We are using the laravel snappy to generate the pdf with graph using google library. When we generate the pdf at the moment it shows error as:

[2022-09-07 10:12:32] local.ERROR: The exit status code '-1073741819' says something went wrong:
stderr: "Loading pages (1/6)
[>                                                           ] 0%
[======>                                                     ] 10%
[========>                                                   ] 14%
Warning: Failed to load http://www.gstatic.com/charts/loader.js (ignore)
"
stdout: ""
command: C:\"Program Files"\wkhtmltopdf\bin\wkhtmltopdf --lowquality --enable-javascript --javascript-delay "1200000" --enable-smart-shrinking --no-stop-slow-scripts "C:\Users\santosh\AppData\Local\Temp\knp_snappy63186e90573620.16051650.html" "C:\Users\santosh\AppData\Local\Temp\knp_snappy63186e90578264.77645537.pdf".  


The controller code is as below:

        try{
            $render = view('graph')->render();
   
            $pdf = \PDF::loadView('graph');
            $pdf->setOption('enable-javascript', true);
            $pdf->setOption('javascript-delay', 1200000);
            $pdf->setOption('enable-smart-shrinking', true);
            $pdf->setOption('no-stop-slow-scripts', true);
            return $pdf->download('graph.pdf');

        }catch(Exception $e){
            Log::error($e->getMessage());
        }

Tried multiple things but noithing seems to be working. Anyone please help me with same.

0

There are 0 best solutions below