KoolReport's Forum

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

Error: "Failed to load PDF document." #2076

Open Jeremy Gray opened this topic on on May 12, 2021 - 4 comments

Jeremy Gray commented on May 12, 2021

I get the error when using in index.php the following....



$report->run()->render();
$report->export()->pdf()->toBrowser("filename.pdf", true);


Jeremy Gray commented on May 12, 2021

when I remove

// $report->run()->render();

from index.php it generates the report, but then I can no longer see variables in my report called in report.view.php with....


<?php $rpt = $this->dataStore("result")->get(0); ?>

<?php echo $rpt["variablename"]; ?>

the variablename value does not appear in the pdf

however if I also include


<?php echo "testing";  ?>


that does appear in the pdf.

Jeremy Gray commented on May 12, 2021

I think I got it.... in index.php it needs to include run() first.

$report->run()->export()->pdf()->toBrowser("filename.pdf", true);

Jeremy Gray commented on May 12, 2021

Is there documentation anywhere? Not usage examples, but documentation on each module?

i.e. for the export module, is there a list of all values that can be passed to 'pdf' somewhere?

->pdf(array(
    "format"=>"A4",
    "orientation"=>"portrait"
))
Sebastian Morales commented on May 13, 2021

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
None yet

None