Hi . l when export to pdf in larave, my file pdf is blank .
// web.php
Route::get('admin/testreport', "TestReportController@index");
// MyPage.php
<?php
namespace App\Reports;
class MyPage extends \koolreport\KoolReport {
use \koolreport\laravel\Friendship;
use \koolreport\export\Exportable;
public function settings()
{ }
protected function setup()
{ }
}
// MyPage.view.php
<html>
<head>
<title>Content that you want to convert to PDF</title>
</head>
<body>
<h1>Export HTML to PDF</h1>
<p>It is easy to convert HTML to PDF using KoolReport's Export package</p>
</body>
</html>
// MyPageController.php
<?php
namespace App\Http\Controllers;
use App\Reports\MyPage;
class MyPageController extends Controller {
public function index()
{
$report = new MyPage;
$report->run()->export('MyPage')
->settings(array(
"resourceWaiting"=>5000,
))
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"
))
->toBrowser("mypage.pdf",true);
}
}
help me. thanks.