Hi, I've searched the forum for anything about this and have tried what I've found but nothing seems to be working. I'm running PHP 8.1.4 on a Windows Server and that charts are displayed on the screen ok, but not when I export to PDF and I'm using the latest version 5.3.0.
This is my export code and I've tried with or without the localtemp folder. I've checked the tmp files that are created and renamed them to html and they also don't display the chart:
$report->export('manupskillingpdf')
->settings([
"useLocalTempFolder" => true,
//"autoDeleteTempFile" => true,
//"resourceWaiting"=>2000,
])
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait",
"margin"=>"0.5in",
"zoom"=>1
))
->toBrowser($fileName, true); //add ,true to view in browser first
In my class file I've also tried setting the assets paths and still no luck, so just put it back to normal:
public function settings() {
return array(
/*"assets"=>array(
"path"=>_ROOT_PATH."_reports_output/",
"url"=>"/_reports_output/"
),*/
"dataSources"=>array(
"data"=>array(
"connectionString"=>"mysql:host="._SERVER.";dbname="._DATABASE,
"username"=>_USER,
"password"=>_PASS,
"charset"=>"utf8"
)
)
);
}
This is the code it produces in the tmp file for the chart and everything is pointing to the correct locations:
<krwidget widget-name='gchart64672b1bb5ab12' widget-type='koolreport/widgets/google/PieChart'><div id="gchart64672b1bb5ab12" style="width:100%;height:400px;"></div>
<script type="text/javascript">
KoolReport.widget.init({"js":["\/_includes\/vendor\/koolreport\/core\/src\/clients\/jquery\/jquery.min.js",["\/_includes\/vendor\/koolreport\/core\/src\/widgets\/google\/clients\/googlechart.js"]],"css":[]},function(){
gchart64672b1bb5ab12 = new KoolReport.google.chart("PieChart","gchart64672b1bb5ab12",["programme","worked"],[["programme","worked"],["40242 | Prog1",{"v":915,"f":"15:15 hrs"}],["40243 | Prog2",{"v":4620,"f":"77:00 hrs"}],["40248 | Prog3",{"v":120,"f":"02:00 hrs"}],["40540 | Prog4",{"v":120,"f":"02:00 hrs"}],["40880 | Prog5",{"v":37560,"f":"626:00 hrs"}]],{"is3D":true},{"package":"corechart","stability":"current","language":"en","mapsApiKey":""});
});
</script></krwidget>
There are also no errors being displayed either when I press F12 for the developer console. Tried everything I can think of and various combinations of the above, and still nothing. Any other suggestions?