Hello support team, I need your help on this issue that wasted my time.. I want to display company logo in the header, coming from public/uploads folder, nothing seems to work to show this image, though header text does show up when exported to pdf. I tried different syntax from the answers online and your forum, but they didn't work
In my xxxReport.view.php I have this code:
<?php
use \koolreport\widgets\koolphp\Table;
?>
<!DOCTYPE html>
<html>
<!-- language based page style -->
<?php
if ($this->lang == 'ar') {
echo '<style>body,.table {text-align: right; direction: rtl;}</style>';
} else {
echo '<style>body,.table {text-align: left; direction: ltr;}</style>';
}
?>
<!-- general styles -->
<style>
@media print {
body {
width: 100%;
}
table.table thead {
background-color: #324148;
color: #fff
}
table th,
table td {
text-align: center;
padding: 5px;
line-height: normal;
border: 1px solid grey;
page-break-inside: avoid !important;
page-break-after: auto !important;
}
.table {
display: table;
width: 100%;
border-collapse: collapse;
page-break-inside: avoid !important;
page-break-after: auto !important;
}
}
</style>
<body style="margin:1in">
<!-- display translated and aligned header -->
<img src="<?$this->load->helper('/uploads/'.$this->company_info->logo)?>" />
.
.
.
And in xxxReport.php I have:
<?php
namespace App\Reports;
use App\Http\CommonClasses\custom;
class JournalVouchersReportSetup extends \koolreport\KoolReport
{
use \koolreport\laravel\Friendship;
use \koolreport\export\Exportable;
public function setup () {
$user=custom::get_current_user();
$co=custom::get_company_info();
$this->user_info = $user;
$this->company_info = $co;
$this->lang = app()->getLocale();
if (app()->getLocale() == "ar") {
$this->src("mysql")
->query("
some query
")
->pipe($this->dataStore("xxx"));
} else {
$this->src("mysql")
->query("
some query
")
->pipe($this->dataStore("xxx"));
}
}
}
So what is the problem? I would appreciate your quick response Thanks