KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Export to pdf... #1433

Closed tim hatzenbeler opened this topic on on May 8, 2020 - 13 comments

tim hatzenbeler commented on May 8, 2020

I'm receiving this error.

( ! ) Fatal error: Uncaught Exception: Could not save content to temporary folder in C:\xampp\htdocs\reporttest\KoolReport\export\Handler.php on line 128 ( ! ) Exception: Could not save content to temporary folder in C:\xampp\htdocs\reporttest\KoolReport\export\Handler.php on line 128 Call Stack

Time Memory Function Location 1 0.2072 392816 {main}( ) ...\index.php:0 2 2.2644 1620040 koolreport\export\Handler->pdf( ) ...\index.php:13 3 2.2645 1620120 koolreport\export\Handler->saveTempContent( ) ...\Handler.php:235

tim hatzenbeler commented on May 8, 2020

I'm using xampp for this local test. The report generates fine... its just the export... I moved the libraries koolreport packages from outside of htdocs into the actual public web folders just to see if it was a folder security issue. It didn't help.

KoolReport commented on May 8, 2020

Could you please check if there is below line in your code:

"useLocalTempFolder"=>true
tim hatzenbeler commented on May 8, 2020

I did not use that.

KoolReport commented on May 8, 2020

Sure, it seems to me that your php does not have permission to access system temporary folder. You may need to set temp folder inside php.ini.

Another solution is you use above useLocalTempFolder, which is available in documentation here. Basically you do:

$report->export()
->settings(array(
    "useLocalTempFolder"=>true,
))
->pdf(array(
    "format"=>"A4",
    "orientation"=>"portrait"
))
->toBrowser("report.pdf");

Hope that helps. Let me know if it works.

tim hatzenbeler commented on May 8, 2020

Making progress, new error.. I'm assuming, I need to install it, and put it in the php bin folder.

( ! ) Fatal error: Uncaught Exception: Could not find phantomjs executed file in bin folder in C:\xampp\htdocs\reporttest\KoolReport\export\Handler.php on line 58 ( ! ) Exception: Could not find phantomjs executed file in bin folder in C:\xampp\htdocs\reporttest\KoolReport\export\Handler.php on line 58

KoolReport commented on May 8, 2020

The export package need phantomjs. Since the file is big so we dont put into library, you download correct version from here. Please make sure that it has permission to run. What OS do you use, Tim?

tim hatzenbeler commented on May 8, 2020

locally windows 10.... i'm sure godaddy is Linux, with cpanel.

KoolReport commented on May 8, 2020

Yes, so at local, you copy file "phantomjs.exe" to export/bin folder. In godaddy you should use linux version of phantomjs.

tim hatzenbeler commented on May 8, 2020

This worked... Thank you... Question... What permission should I give, phantomjs in Linux and Windows... It originally did not work, so to quickly test, I granted everyone -> full control (windows 10)... what would be best practice?

thanks again.

KoolReport commented on May 8, 2020

We are using 755, which mean "read, execute" for everyone, "write" for owner. As long as the file can be executed by php, it is good to go. In Window, your localhost, it is not very important to set permission as you only use for development.

KoolReport commented on May 8, 2020

BTW, I am Donald, on behalf of support team, thank you for being our customer :)

tim hatzenbeler commented on May 8, 2020

Donald, thank you.... I'm probably going to have a few more threads... I want to work through all the packages... Quick question... is there a way to use the geo chart and drop the scalable circles (markers) on them like most of the covid maps? I wand to present some demographic data, and that would be a cool way to represent it.

KoolReport commented on May 9, 2020

It is possible to create with Google GeoChart with marker. Here is the example from google geo chart. Currently we have not had the example for this kind of chart yet.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

Export