Improved logo display in Invoice/Estimate PDFs

This commit is contained in:
Darko Gjorgjijoski
2024-08-04 16:08:22 +02:00
parent c9e85f18da
commit c799149d2d
7 changed files with 24 additions and 9 deletions

View File

@@ -398,7 +398,7 @@
<tr>
<td class="text-center">
@if ($logo)
<img class="header-logo" style="height: 50px;" src="{{ $logo }}" alt="Company Logo">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
@else
@if ($estimate->customer->company)
<h2 class="header-logo"> {{ $estimate->customer->company->name }} </h2>

View File

@@ -420,7 +420,7 @@
<tr>
@if ($logo)
<td width="60%" class="header-section-left">
<img class="header-logo" style="height: 50px;" src="{{ $logo }}" alt="Company Logo">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
</td>
@else
<td width="60%" class="header-section-left" style="padding-top: 0px;">

View File

@@ -358,7 +358,7 @@
<tr>
<td width="50%" class="header-section-left">
@if ($logo)
<img class="header-logo" style="height: 50px;" src="{{ $logo }}" alt="Company Logo">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
@else
<h1 class="header-logo"> {{ $estimate->customer->company->name }} </h1>
@endif

View File

@@ -328,9 +328,6 @@
</style>
@if (App::isLocale('th'))
@include('app.pdf.locale.th')
@endif
</head>
<body>
@@ -339,7 +336,7 @@
<tr>
<td class="text-center">
@if ($logo)
<img class="header-logo" style="height:50px" src="{{ "data:".mime_content_type($logo).";base64,".base64_encode(file_get_contents($logo)) }}" alt="Company Logo">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
@else
@if ($invoice->customer->company)
<h2 class="header-logo"> {{ $invoice->customer->company->name }}</h2>

View File

@@ -389,7 +389,7 @@
<tr>
<td width="60%" class="header-section-left">
@if ($logo)
<img class="header-logo" src="{{ "data:".mime_content_type($logo).";base64,".base64_encode(file_get_contents($logo)) }}" alt="Company Logo" style="height: 50px;">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
@elseif ($invoice->customer->company)
<h1 class="header-logo" style="padding-top: 0px;">
{{ $invoice->customer->company->name }}

View File

@@ -318,7 +318,7 @@
<tr>
<td width="50%" class="header-section-left">
@if ($logo)
<img class="header-logo" style="height: 50px;" src="{{ "data:".mime_content_type($logo).";base64,".base64_encode(file_get_contents($logo)) }}" alt="Company Logo">
<img class="header-logo" style="height:50px" src="{{ \App\Space\ImageUtils::toBase64Src($logo) }}" alt="Company Logo">
@else
<h1 class="header-logo"> {{ $invoice->customer->company->name }} </h1>
@endif