Update for page numbering
This commit is contained in:
parent
8b46b6737e
commit
6f231fbd60
|
|
@ -36,23 +36,21 @@ class PDF extends FPDI
|
||||||
|
|
||||||
// Calculate X position with offset
|
// Calculate X position with offset
|
||||||
$base_x = config('ninja.pdf_page_numbering_x_alignment');
|
$base_x = config('ninja.pdf_page_numbering_x_alignment');
|
||||||
$x_position = $base_x + $this->x_offset;
|
|
||||||
|
|
||||||
// Set X position based on alignment
|
// Set X position based on alignment
|
||||||
if ($this->text_alignment == 'L') {
|
if ($this->text_alignment == 'L') {
|
||||||
$this->SetX($x_position);
|
$this->SetX($this->GetX() + $base_x);
|
||||||
// Adjust cell width to account for X offset
|
// Adjust cell width to account for X offset
|
||||||
$cell_width = $this->GetPageWidth() - $x_position - 10;
|
$cell_width = $this->GetPageWidth();
|
||||||
$this->Cell($cell_width, 5, $trans, 0, 0, 'L');
|
$this->Cell($cell_width, 5, $trans, 0, 0, 'L');
|
||||||
} elseif ($this->text_alignment == 'R') {
|
} elseif ($this->text_alignment == 'R') {
|
||||||
$this->SetX($x_position);
|
$this->SetX($this->GetX() + $base_x);
|
||||||
// For right alignment, calculate width from X position to right edge
|
// For right alignment, calculate width from X position to right edge
|
||||||
$cell_width = $this->GetPageWidth() - $x_position;
|
$cell_width = $this->GetPageWidth();
|
||||||
$this->Cell($cell_width, 5, $trans, 0, 0, 'R');
|
$this->Cell($cell_width, 5, $trans, 0, 0, 'R');
|
||||||
} else {
|
} else {
|
||||||
$this->SetX($x_position);
|
|
||||||
// For center alignment, calculate appropriate width
|
// For center alignment, calculate appropriate width
|
||||||
$cell_width = $this->GetPageWidth() - ($x_position * 2);
|
$cell_width = $this->GetPageWidth();
|
||||||
$this->Cell($cell_width, 5, $trans, 0, 0, 'C');
|
$this->Cell($cell_width, 5, $trans, 0, 0, 'C');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11410,16 +11410,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry",
|
"name": "sentry/sentry",
|
||||||
"version": "4.15.0",
|
"version": "4.15.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/getsentry/sentry-php.git",
|
"url": "https://github.com/getsentry/sentry-php.git",
|
||||||
"reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355"
|
"reference": "0d09baf3700869ec4b723c95eb466de56c3d74b6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b2d84de69f3eda8ca22b0b00e9f923be3b837355",
|
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/0d09baf3700869ec4b723c95eb466de56c3d74b6",
|
||||||
"reference": "b2d84de69f3eda8ca22b0b00e9f923be3b837355",
|
"reference": "0d09baf3700869ec4b723c95eb466de56c3d74b6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -11483,7 +11483,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/getsentry/sentry-php/issues",
|
"issues": "https://github.com/getsentry/sentry-php/issues",
|
||||||
"source": "https://github.com/getsentry/sentry-php/tree/4.15.0"
|
"source": "https://github.com/getsentry/sentry-php/tree/4.15.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
|
@ -11495,7 +11495,7 @@
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2025-08-20T14:26:37+00:00"
|
"time": "2025-08-28T15:45:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry-laravel",
|
"name": "sentry/sentry-laravel",
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ return [
|
||||||
'storecove_email_catchall' => env('STORECOVE_CATCHALL_EMAIL',false),
|
'storecove_email_catchall' => env('STORECOVE_CATCHALL_EMAIL',false),
|
||||||
'qvalia_api_key' => env('QVALIA_API_KEY', false),
|
'qvalia_api_key' => env('QVALIA_API_KEY', false),
|
||||||
'qvalia_partner_number' => env('QVALIA_PARTNER_NUMBER', false),
|
'qvalia_partner_number' => env('QVALIA_PARTNER_NUMBER', false),
|
||||||
'pdf_page_numbering_x_alignment' => env('PDF_PAGE_NUMBER_X', 0),
|
'pdf_page_numbering_x_alignment' => env('PDF_PAGE_NUMBER_X', -10),
|
||||||
'pdf_page_numbering_y_alignment' => env('PDF_PAGE_NUMBER_Y', -6),
|
'pdf_page_numbering_y_alignment' => env('PDF_PAGE_NUMBER_Y', -6),
|
||||||
'hosted_einvoice_secret' => env('HOSTED_EINVOICE_SECRET', null),
|
'hosted_einvoice_secret' => env('HOSTED_EINVOICE_SECRET', null),
|
||||||
'e_invoice_quota_warning' => env('E_INVOICE_QUOTA_WARNING', 15),
|
'e_invoice_quota_warning' => env('E_INVOICE_QUOTA_WARNING', 15),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue