I went through the install of phantomjs and updated export.php as follows:
<?php
ini_set('display_errors', 1);
//error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once "SakilaRental.php";
$report = new SakilaRental;
$report->run()
->export('SakilaRentalPdf')
->settings(array(
"phantomjs"=>"/usr/local/bin",
))
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait",
//"zoom"=>2
))
->toBrowser("sakila_rental.pdf, true");
I received the following error:
Fatal error: Uncaught Exception: Could not execute phantomjs in /var/www/html/koolreport/packages/export/Handler.php:72 Stack trace: #0 /var/www/html/koolreport/packages/export/Handler.php(237): koolreport\export\Handler->runPhantom('/var/www/html/k...', '/tmp/5c846a2383...', '/tmp/5c846a2383...', 'eyJmb3JtYXQiOiJ...') #1 /var/www/html/examples/reports/export/sakila_rental/export.php(15): koolreport\export\Handler->pdf(Array) #2 {main} thrown in /var/www/html/koolreport/packages/export/Handler.php on line 72
Listing for phantomjs is as follows:
lrwxrwxrwx 1 root root 59 Mar 9 20:22 /usr/local/bin/phantomjs -> /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs