@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | * @param string $sDestino Destino do PDF I-browser D-download S-string F-salva |
| 73 | 73 | * @param array $aEnd array com o endereço do emitente |
| 74 | 74 | * @param string $sDirPDF Caminho para o diretorio de armazenamento dos arquivos PDF |
| 75 | - * @param string $fonteDANFE Nome da fonte alternativa do DAnfe |
|
| 76 | - * @param number $mododebug 0-Não 1-Sim e 2-nada (2 default) |
|
| 75 | + * @param string $fontePDF Nome da fonte alternativa do DAnfe |
|
| 76 | + * @param integer $mododebug 0-Não 1-Sim e 2-nada (2 default) |
|
| 77 | 77 | */ |
| 78 | 78 | public function __construct( |
| 79 | 79 | $docXML = '', |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | 236 | * Monta o cabeçalho |
| 237 | - * @param number $x |
|
| 238 | - * @param number $y |
|
| 239 | - * @param number $pag |
|
| 237 | + * @param integer $x |
|
| 238 | + * @param integer $y |
|
| 239 | + * @param integer $pag |
|
| 240 | 240 | * @return number |
| 241 | 241 | */ |
| 242 | 242 | private function pHeader($x, $y, $pag) |
@@ -430,8 +430,8 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | /** |
| 432 | 432 | * Monta o corpo da pagina |
| 433 | - * @param number $x |
|
| 434 | - * @param number $y |
|
| 433 | + * @param integer $x |
|
| 434 | + * @param double $y |
|
| 435 | 435 | */ |
| 436 | 436 | private function pBody($x, $y) |
| 437 | 437 | { |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | |
| 483 | 483 | /** |
| 484 | 484 | * Monta o rodapé |
| 485 | - * @param number $x |
|
| 485 | + * @param integer $x |
|
| 486 | 486 | * @param number $y |
| 487 | 487 | */ |
| 488 | 488 | protected function pFooter($x, $y) |
@@ -542,6 +542,9 @@ discard block |
||
| 542 | 542 | return $this->pdf->Output($nome, $destino); |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | + /** |
|
| 546 | + * @param string $original |
|
| 547 | + */ |
|
| 545 | 548 | private function imagePNGtoJPG($original) |
| 546 | 549 | { |
| 547 | 550 | $image = imagecreatefrompng($original); |
@@ -313,12 +313,12 @@ discard block |
||
| 313 | 313 | $tw = $w; |
| 314 | 314 | } |
| 315 | 315 | // Nome emitente |
| 316 | - $aFont = ['font' => $this->fontePadrao,'size' => 12,'style' => 'B']; |
|
| 316 | + $aFont = ['font' => $this->fontePadrao, 'size' => 12, 'style' => 'B']; |
|
| 317 | 317 | $texto = $this->aEnd['razao']; |
| 318 | 318 | $this->pTextBox($x1, $y1, $tw, 8, $texto, $aFont, 'T', 'C', 0, ''); |
| 319 | 319 | // endereço |
| 320 | 320 | $y1 = $y1 + 6; |
| 321 | - $aFont = ['font' => $this->fontePadrao,'size' => 8,'style' => '']; |
|
| 321 | + $aFont = ['font' => $this->fontePadrao, 'size' => 8, 'style' => '']; |
|
| 322 | 322 | $lgr = $this->aEnd['logradouro']; |
| 323 | 323 | $nro = $this->aEnd['numero']; |
| 324 | 324 | $cpl = $this->aEnd['complemento']; |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | $x += $w; |
| 349 | 349 | $this->pTextBox($x, $y, $w2, $h); |
| 350 | 350 | $y1 = $y + $h; |
| 351 | - $aFont = ['font' => $this->fontePadrao,'size' => 16,'style' => 'B']; |
|
| 351 | + $aFont = ['font' => $this->fontePadrao, 'size' => 16, 'style' => 'B']; |
|
| 352 | 352 | $this->pTextBox($x, $y + 2, $w2, 8, 'Representação Gráfica de CC-e', $aFont, 'T', 'C', 0, ''); |
| 353 | 353 | $aFont = array( |
| 354 | 354 | 'font' => $this->fontePadrao, |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | ); |
| 358 | 358 | $this->pTextBox($x, $y + 7, $w2, 8, '(Carta de Correção Eletrônica)', $aFont, 'T', 'C', 0, ''); |
| 359 | 359 | $texto = 'ID do Evento: ' . $this->id; |
| 360 | - $aFont = ['font' => $this->fontePadrao,'size' => 10,'style' => '']; |
|
| 360 | + $aFont = ['font' => $this->fontePadrao, 'size' => 10, 'style' => '']; |
|
| 361 | 361 | $this->pTextBox($x, $y + 15, $w2, 8, $texto, $aFont, 'T', 'L', 0, ''); |
| 362 | 362 | $tsHora = $this->pConvertTime($this->dhEvento); |
| 363 | 363 | $texto = 'Criado em : ' . date('d/m/Y H:i:s', $tsHora); |
@@ -369,9 +369,9 @@ discard block |
||
| 369 | 369 | $x = $oldX; |
| 370 | 370 | $this->pTextBox($x, $y1, $maxW, 40); |
| 371 | 371 | $sY = $y1 + 40; |
| 372 | - $texto = 'De acordo com as determinações legais vigentes, vimos por meio desta comunicar-lhe'. |
|
| 372 | + $texto = 'De acordo com as determinações legais vigentes, vimos por meio desta comunicar-lhe' . |
|
| 373 | 373 | ' que a Nota Fiscal, abaixo referenciada, contêm irregularidades que estão destacadas e' . |
| 374 | - ' suas respectivas correções, solicitamos que sejam aplicadas essas correções ao executar'. |
|
| 374 | + ' suas respectivas correções, solicitamos que sejam aplicadas essas correções ao executar' . |
|
| 375 | 375 | ' seus lançamentos fiscais.'; |
| 376 | 376 | $aFont = array( |
| 377 | 377 | 'font' => $this->fontePadrao, |
@@ -550,6 +550,6 @@ discard block |
||
| 550 | 550 | imagedestroy($image); |
| 551 | 551 | $stringdata = ob_get_contents(); // read from buffer |
| 552 | 552 | ob_end_clean(); |
| 553 | - return 'data://text/plain;base64,'.base64_encode($stringdata); |
|
| 553 | + return 'data://text/plain;base64,' . base64_encode($stringdata); |
|
| 554 | 554 | } |
| 555 | 555 | } |