mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 23:16:03 +00:00
This commit is contained in:
37
application/Espo/Core/Pdf/Tcpdf.php
Normal file
37
application/Espo/Core/Pdf/Tcpdf.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Pdf;
|
||||
|
||||
require "vendor/tecnick.com/tcpdf/tcpdf.php";
|
||||
|
||||
class Tcpdf extends \TCPDF
|
||||
{
|
||||
protected $footerHtml;
|
||||
|
||||
public function Footer() {
|
||||
$this->SetY(-15);
|
||||
$this->Cell(0, 10, $this->getAliasNumPage(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,6 @@ use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
use \Espo\Core\Htmlizer\Htmlizer;
|
||||
|
||||
require "vendor/tecnick.com/tcpdf/tcpdf.php";
|
||||
|
||||
class Pdf extends \Espo\Core\EntryPoints\Base
|
||||
{
|
||||
@@ -62,8 +61,9 @@ class Pdf extends \Espo\Core\EntryPoints\Base
|
||||
|
||||
$htmlizer = new Htmlizer($this->getFileManager(), $this->getDateTime(), $this->getNumber());
|
||||
|
||||
$pdf = new \TCPDF();
|
||||
$pdf = new \Espo\Core\Pdf\Tcpdf();
|
||||
$pdf->setPrintHeader(false);
|
||||
//$pdf->setPrintFooter(false);
|
||||
$pdf->setAutoPageBreak(true, $template->get('bottomMargin'));
|
||||
$pdf->setMargins($template->get('leftMargin'), $template->get('topMargin'), $template->get('rightMargin'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user