Hi, I am integrating KoolReport Pro into our system, and I was wondering if there was a simple way to set the pdf output as a variable or base64 encode it to be returned as a json object. Fore example, the sakila_rental example uses the following code -
$report->run()
->export('SakilaRentalPdf')
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"))
->toBrowser("sakila_rental.pdf");
What I'd like to do is -
$resultOutput = $report
->run()
->export('SakilaRentalPdf')
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"
))->toBrowser("sakila_rental.pdf");
$encodedResult = base64_encode($resultOutput);
Any help with this is much appreciated.
Update: have this sorted, added a custom function to "File" package.