Exporter

Overview #

Exporter helps you to utilize the Export package (if you have) to export any HTML or PHP code file to PDF and other formats.

<?php
require_once "koolreport/autoload.php";
use \koolreport\instant\Exporter;

Exporter::export("/full/path/to/your/file.php")
->pdf(array(
    "format"=>"A4",
    "orientation"=>"portrait"
))
->toBrowser("myfile.pdf");

or you can save file

Exporter::export("/full/path/to/your/file.php")
->pdf(array(
    "format"=>"A4",
    "orientation"=>"portrait"
))
->saveAs("myfile.pdf");

Parameters #

You may provide parameters to your file like below:

<?php
require_once "koolreport/autoload.php";
use \koolreport\instant\Exporter;

Exporter::export("/full/path/to/your/file.php",array(
    "param1"=>"value1",
    "param2"=>"value2"
))
->pdf(array(
    "format"=>"A4",
    "orientation"=>"portrait"
))
->toBrowser("myfile.pdf");

In your file.php which use to render PDF, you will receive parameters $param1 and $param2.

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.