Closed aparedesBB closed 5 years ago
@aparedesBB got any luck with this problem? i'm having timeout when trying to export to pdf too :(
@brnbp I had to change the library to make charts. In order to be able to render charts on server side so them can be shown without problems in the PDF I used this one.
http://luddep.se/notebook/2008/04/13/charts-php-and-google-charts-api/
It has less chart types but it works for what I need. Hope it helps!
unless you use some javascript engine to run the resulting code from the library, you can't export to PDF. Google Charts is a JS api, it needs to be ran through a browser engine of sorts. (I have successfully used PhantomJS to create PNGs serverside)
What Version?
3.1.0
Issue
I'm using lavacharts to make some charts. If I render them in a laravel view (with blade) they display without any problem. I render them as images using
['png' => true]
in the charts options. But when I try to render them in a PDF (I started with DomPDF but now I use Laravel snappy) they doesn't show. I have a this theory where I suppose that if I render the charts putting the JS in the view this might work. But I tried with\Lava::getScriptManager()->bypassLavaJsOutput();
and it says that getScriptManager is not a method. Any suggestions please? NOTE: If i put anything else in the view it does shows in the PDF.Controller Code (chart creation code)
View Code