-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: imprimir_orc file using fpdf library
- Loading branch information
1 parent
ba3e466
commit 80cc354
Showing
4 changed files
with
186 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/** | ||
* PDF [ UTIL ] | ||
* Gerar PDFs Papel timbrado da Empresa ELFI | ||
* @copyright (c) 2018, Armando JR. ELFISERVICE | ||
* by biblioteca fpdf | ||
*/ | ||
|
||
class PDF extends FPDF | ||
{ | ||
private $textoRodaPe; | ||
|
||
function __construct($textoRodaPe, $orientation = 'P', $unit = 'mm', $size = 'A4') { | ||
parent::__construct($orientation, $unit, $size); | ||
$this->textoRodaPe = $textoRodaPe; | ||
|
||
} | ||
|
||
function setRodapeTexto($rodape) { | ||
$this->textoRodaPe = $rodape; | ||
} | ||
|
||
// Page header | ||
function Header() | ||
{ | ||
// Logo | ||
$this->Image('../../../imagens/logo_elfi.jpg',10,12,30); | ||
// Arial bold 15 | ||
$this->SetFont('Arial','',10); | ||
// Move to the right | ||
$this->Cell(40); | ||
// Title | ||
$this->MultiCell(0,4, utf8_decode('Montagens e Manutenções de: Subestações, Transformadores, Grupo Geradores, Disjuntores Banco de Capacitores Fixo e Automático, Quadros de Comando, Força e Luz, S.P.D.A., Tratamento de Óleo Isolante pelo processo Termo-Vácuo, Comissionamento de Subestação, Termografia. Desde 1993 trazendo soluções para sua empresa.'),0,'L'); | ||
$this->Ln(8); | ||
} | ||
|
||
function Footer() | ||
{ | ||
// Position at 1.5 cm from bottom | ||
$this->SetY(-15); | ||
// Arial italic 8 | ||
$this->SetFont('Arial','',8); | ||
|
||
$this->MultiCell(190, 4, utf8_decode($this->textoRodaPe),0,'C'); | ||
// Page number | ||
$this->Cell(0,5,'Pg '.$this->PageNo().'/{nb}',0,0,'R'); | ||
} | ||
|
||
function divisorHeader($texto) { | ||
$this->Ln(2); | ||
$this->SetFont('Arial','B',10); | ||
$this->Cell(0,6,$texto,1,1,'C'); | ||
$this->SetFont('Arial','',9); | ||
$this->Ln(2); | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.