Fix Overlapping logo with company information in PDF Invoice and Quote

This commit is contained in:
johnnyq 2025-06-23 19:43:41 -04:00
parent 2b4933bd5c
commit 12d8c8e959
3 changed files with 20 additions and 32 deletions

View File

@ -284,14 +284,11 @@ if (isset($_GET['export_quote_pdf'])) {
$pdf->SetFont('helvetica', '', 10);
// Logo + Right Columns
$html = '<table width="100%" cellspacing="0" cellpadding="5">
$html = '<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td width="40%">';
if (!empty($company_logo)) {
$logo_path = "../uploads/settings/$company_logo";
if (file_exists($logo_path)) {
$pdf->Image($logo_path, $pdf->GetX(), $pdf->GetY(), 40);
}
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
$html .= '<img src="/uploads/settings/' . $company_logo . '" width="120">';
}
$html .= '</td>
<td width="60%" align="right">
@ -305,7 +302,7 @@ if (isset($_GET['export_quote_pdf'])) {
}
$html .= '</td>
</tr>
</table><br><br>';
</table><br>';
// Billing titles
$html .= '<table width="100%" cellspacing="0" cellpadding="2">
@ -320,7 +317,7 @@ if (isset($_GET['export_quote_pdf'])) {
</table><br>';
// Date table
$html .= '<table border="0" cellpadding="3" cellspacing="0" width="100%">
$html .= '<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="60%"></td>
<td width="20%" style="font-size:10pt;"><strong>Date:</strong></td>
@ -510,14 +507,11 @@ if (isset($_GET['export_invoice_pdf'])) {
$pdf->SetFont('helvetica', '', 10);
// Logo + Right Columns
$html = '<table width="100%" cellspacing="0" cellpadding="5">
$html = '<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td width="40%">';
if (!empty($company_logo)) {
$logo_path = "../uploads/settings/$company_logo";
if (file_exists($logo_path)) {
$pdf->Image($logo_path, $pdf->GetX(), $pdf->GetY(), 40);
}
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
$html .= '<img src="/uploads/settings/' . $company_logo . '" width="120">';
}
$html .= '</td>
<td width="60%" align="right">
@ -528,7 +522,7 @@ if (isset($_GET['export_invoice_pdf'])) {
}
$html .= '</td>
</tr>
</table><br><br>';
</table><br>';
// Billing titles
$html .= '<table width="100%" cellspacing="0" cellpadding="2">
@ -543,7 +537,7 @@ if (isset($_GET['export_invoice_pdf'])) {
</table><br>';
// Date table
$html .= '<table border="0" cellpadding="3" cellspacing="0" width="100%">
$html .= '<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="60%"></td>
<td width="20%" style="font-size:10pt;"><strong>Date:</strong></td>

View File

@ -1914,14 +1914,11 @@ if (isset($_GET['export_invoice_pdf'])) {
$pdf->SetFont('helvetica', '', 10);
// Logo + Right Columns
$html = '<table width="100%" cellspacing="0" cellpadding="5">
$html = '<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td width="40%">';
if (!empty($company_logo)) {
$logo_path = "uploads/settings/$company_logo";
if (file_exists($logo_path)) {
$pdf->Image($logo_path, $pdf->GetX(), $pdf->GetY(), 40);
}
if (!empty($company_logo) && file_exists("uploads/settings/$company_logo")) {
$html .= '<img src="uploads/settings/' . $company_logo . '" width="120">';
}
$html .= '</td>
<td width="60%" align="right">
@ -1932,7 +1929,7 @@ if (isset($_GET['export_invoice_pdf'])) {
}
$html .= '</td>
</tr>
</table><br><br>';
</table><br>';
// Billing titles
$html .= '<table width="100%" cellspacing="0" cellpadding="2">
@ -1947,7 +1944,7 @@ if (isset($_GET['export_invoice_pdf'])) {
</table><br>';
// Date table
$html .= '<table border="0" cellpadding="3" cellspacing="0" width="100%">
$html .= '<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="60%"></td>
<td width="20%" style="font-size:10pt;"><strong>Date:</strong></td>

View File

@ -694,14 +694,11 @@ if (isset($_GET['export_quote_pdf'])) {
$pdf->SetFont('helvetica', '', 10);
// Logo + Right Columns
$html = '<table width="100%" cellspacing="0" cellpadding="5">
$html = '<table width="100%" cellspacing="0" cellpadding="3">
<tr>
<td width="40%">';
if (!empty($company_logo)) {
$logo_path = "uploads/settings/$company_logo";
if (file_exists($logo_path)) {
$pdf->Image($logo_path, $pdf->GetX(), $pdf->GetY(), 40);
}
if (!empty($company_logo) && file_exists("uploads/settings/$company_logo")) {
$html .= '<img src="uploads/settings/' . $company_logo . '" width="120">';
}
$html .= '</td>
<td width="60%" align="right">
@ -715,7 +712,7 @@ if (isset($_GET['export_quote_pdf'])) {
}
$html .= '</td>
</tr>
</table><br><br>';
</table><br>';
// Billing titles
$html .= '<table width="100%" cellspacing="0" cellpadding="2">
@ -730,7 +727,7 @@ if (isset($_GET['export_quote_pdf'])) {
</table><br>';
// Date table
$html .= '<table border="0" cellpadding="3" cellspacing="0" width="100%">
$html .= '<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="60%"></td>
<td width="20%" style="font-size:10pt;"><strong>Date:</strong></td>