Hello, I'm trying to save my report into a folder by using the saveAs() function provided by the Export package. The report is also sent to browser with toBrowser() (and this works). My code is the following:
ob_end_clean();
$report = new PdfPaging();
$report->run();
$report->export()
->settings(array(
"phantomjs" => "/usr/bin/phantomjs",
"resourceWaiting"=>2000
))
->pdf([
"format" => "A4",
"margin" => [
'top'=> '50px',
'right'=> '20px',
'bottom'=> '5px',
'left'=>'20px'
]
])
->toBrowser($filename);
$report->export()
->settings(array(
"phantomjs" => "/usr/bin/phantomjs",
"resourceWaiting"=>2000
))
->pdf([
"format" => "A4",
"margin" => [
'top'=> '50px',
'right'=> '20px',
'bottom'=> '5px',
'left'=>'20px'
]
])
->saveAs($filePath);
The variable $filePath
is a valid absolute path, but I also tried with a relative path with no success. Am I missing something? Thank you.