1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 09:21:34 +02:00
invoiceninja/app/Utils/Traits/Pdf/PDF.php

41 lines
797 B
PHP
Raw Normal View History

2022-05-25 03:00:20 +02:00
<?php
2022-05-25 08:34:43 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
2022-05-25 03:00:20 +02:00
namespace App\Utils\Traits\Pdf;
use setasign\Fpdi\Fpdi;
class PDF extends FPDI
{
2022-05-25 08:34:43 +02:00
public $text_alignment = 'L';
2022-05-25 03:00:20 +02:00
function Footer()
{
$this->SetXY(0, -5);
2022-05-25 08:34:43 +02:00
$this->SetFont('Arial','I',9);
$trans = ctrans('texts.pdf_page_info', ['current' => $this->PageNo(), 'total' => '{nb}']);
$this->Cell(0,5, $trans ,0,0, $this->text_alignment);
2022-05-25 03:00:20 +02:00
}
2022-05-25 08:34:43 +02:00
public function setAlignment($alignment)
{
$this->text_alignment = $alignment;
return $this;
}
2022-05-25 03:00:20 +02:00
}