Updates for PDF

This commit is contained in:
David Bomba
2025-09-02 16:24:12 +10:00
parent 9094000f16
commit e083aac531
2 changed files with 7 additions and 9 deletions

View File

@@ -39,18 +39,16 @@ class PDF extends FPDI
// Set X position based on alignment
if ($this->text_alignment == 'L') {
$this->SetX($this->GetX() + $base_x);
// Adjust cell width to account for X offset
$cell_width = $this->GetPageWidth() + $base_x;
$this->SetX($base_x+5);
$cell_width = $this->GetPageWidth();
$this->Cell($cell_width, 5, $trans, 0, 0, 'L');
} elseif ($this->text_alignment == 'R') {
$this->SetX($this->GetX() + $base_x);
// For right alignment, calculate width from X position to right edge
$cell_width = $this->GetPageWidth() + $base_x;
$this->SetX($this->GetPageWidth() - 100 - $base_x);
$cell_width = 100;
$this->Cell($cell_width, 5, $trans, 0, 0, 'R');
} else {
// For center alignment, calculate appropriate width
$cell_width = $this->GetPageWidth() + $base_x;
$this->SetX(0);
$cell_width = $this->GetPageWidth();
$this->Cell($cell_width, 5, $trans, 0, 0, 'C');
}
}

View File

@@ -257,7 +257,7 @@ return [
'storecove_email_catchall' => env('STORECOVE_CATCHALL_EMAIL',false),
'qvalia_api_key' => env('QVALIA_API_KEY', false),
'qvalia_partner_number' => env('QVALIA_PARTNER_NUMBER', false),
'pdf_page_numbering_x_alignment' => env('PDF_PAGE_NUMBER_X', -5),
'pdf_page_numbering_x_alignment' => env('PDF_PAGE_NUMBER_X', 0),
'pdf_page_numbering_y_alignment' => env('PDF_PAGE_NUMBER_Y', -6),
'hosted_einvoice_secret' => env('HOSTED_EINVOICE_SECRET', null),
'e_invoice_quota_warning' => env('E_INVOICE_QUOTA_WARNING', 15),