| @@ 271-310 (lines=40) @@ | ||
| 268 | $this->textBox($x, $y, $w, $h); |
|
| 269 | $texto = 'IDENTIFICAÇÃO DO EMITENTE'; |
|
| 270 | $this->textBox($x, $y, $w, 5, $texto, $aFont, 'T', 'C', 0, ''); |
|
| 271 | if (is_file($this->logomarca)) { |
|
| 272 | $logoInfo = getimagesize($this->logomarca); |
|
| 273 | //largura da imagem em mm |
|
| 274 | $logoWmm = ($logoInfo[0]/72)*25.4; |
|
| 275 | //altura da imagem em mm |
|
| 276 | $logoHmm = ($logoInfo[1]/72)*25.4; |
|
| 277 | if ($this->logoAlign=='L') { |
|
| 278 | $nImgW = round($w/3, 0); |
|
| 279 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 280 | $xImg = $x+1; |
|
| 281 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 282 | //estabelecer posições do texto |
|
| 283 | $x1 = round($xImg + $nImgW +1, 0); |
|
| 284 | $y1 = round($h/3+$y, 0); |
|
| 285 | $tw = round(2*$w/3, 0); |
|
| 286 | } |
|
| 287 | if ($this->logoAlign=='C') { |
|
| 288 | $nImgH = round($h/3, 0); |
|
| 289 | $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
| 290 | $xImg = round(($w-$nImgW)/2+$x, 0); |
|
| 291 | $yImg = $y+3; |
|
| 292 | $x1 = $x; |
|
| 293 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 294 | $tw = $w; |
|
| 295 | } |
|
| 296 | if ($this->logoAlign=='R') { |
|
| 297 | $nImgW = round($w/3, 0); |
|
| 298 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 299 | $xImg = round($x+($w-(1+$nImgW)), 0); |
|
| 300 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 301 | $x1 = $x; |
|
| 302 | $y1 = round($h/3+$y, 0); |
|
| 303 | $tw = round(2*$w/3, 0); |
|
| 304 | } |
|
| 305 | $this->pdf->image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 306 | } else { |
|
| 307 | $x1 = $x; |
|
| 308 | $y1 = round($h/3+$y, 0); |
|
| 309 | $tw = $w; |
|
| 310 | } |
|
| 311 | //Nome emitente |
|
| 312 | $aFont = array('font'=>$this->fontePadrao,'size'=>12,'style'=>'B'); |
|
| 313 | $texto = (isset($this->aEnd['razao'])?$this->aEnd['razao']:''); |
|
| @@ 317-356 (lines=40) @@ | ||
| 314 | $this->pTextBox($x, $y, $w, $h); |
|
| 315 | $texto = 'IDENTIFICAÇÃO DO EMITENTE'; |
|
| 316 | $this->pTextBox($x, $y, $w, 5, $texto, $aFont, 'T', 'C', 0, ''); |
|
| 317 | if (is_file($this->logomarca)) { |
|
| 318 | $logoInfo = getimagesize($this->logomarca); |
|
| 319 | //largura da imagem em mm |
|
| 320 | $logoWmm = ($logoInfo[0]/72)*25.4; |
|
| 321 | //altura da imagem em mm |
|
| 322 | $logoHmm = ($logoInfo[1]/72)*25.4; |
|
| 323 | if ($this->logoAlign=='L') { |
|
| 324 | $nImgW = round($w/3, 0); |
|
| 325 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 326 | $xImg = $x+1; |
|
| 327 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 328 | //estabelecer posições do texto |
|
| 329 | $x1 = round($xImg + $nImgW +1, 0); |
|
| 330 | $y1 = round($h/3+$y, 0); |
|
| 331 | $tw = round(2*$w/3, 0); |
|
| 332 | } |
|
| 333 | if ($this->logoAlign=='C') { |
|
| 334 | $nImgH = round($h/3, 0); |
|
| 335 | $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
| 336 | $xImg = round(($w-$nImgW)/2+$x, 0); |
|
| 337 | $yImg = $y+3; |
|
| 338 | $x1 = $x; |
|
| 339 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 340 | $tw = $w; |
|
| 341 | } |
|
| 342 | if ($this->logoAlign=='R') { |
|
| 343 | $nImgW = round($w/3, 0); |
|
| 344 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 345 | $xImg = round($x+($w-(1+$nImgW)), 0); |
|
| 346 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 347 | $x1 = $x; |
|
| 348 | $y1 = round($h/3+$y, 0); |
|
| 349 | $tw = round(2*$w/3, 0); |
|
| 350 | } |
|
| 351 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 352 | } else { |
|
| 353 | $x1 = $x; |
|
| 354 | $y1 = round($h/3+$y, 0); |
|
| 355 | $tw = $w; |
|
| 356 | } |
|
| 357 | //Nome emitente |
|
| 358 | $aFont = array('font'=>$this->fontePadrao, 'size'=>12, 'style'=>'B'); |
|
| 359 | $texto = (isset($this->aEnd['razao'])?$this->aEnd['razao']:''); |
|
| @@ 282-321 (lines=40) @@ | ||
| 279 | $h=30; |
|
| 280 | $oldY += $h; |
|
| 281 | $this->pTextBox($x, $y, $w, $h); |
|
| 282 | if (is_file($this->logomarca)) { |
|
| 283 | $logoInfo = getimagesize($this->logomarca); |
|
| 284 | //largura da imagem em mm |
|
| 285 | $logoWmm = ($logoInfo[0]/72)*25.4; |
|
| 286 | //altura da imagem em mm |
|
| 287 | $logoHmm = ($logoInfo[1]/72)*25.4; |
|
| 288 | if ($this->logoAlign=='L') { |
|
| 289 | $nImgW = round($w/4.5, 0); |
|
| 290 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 291 | $xImg = $x+1; |
|
| 292 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 293 | //estabelecer posições do texto |
|
| 294 | $x1 = round($xImg + $nImgW +1, 0); |
|
| 295 | $y1 = round($y+2, 0); |
|
| 296 | $tw = round(2*$w/3, 0); |
|
| 297 | } |
|
| 298 | if ($this->logoAlign=='C') { |
|
| 299 | $nImgH = round($h/3, 0); |
|
| 300 | $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
| 301 | $xImg = round(($w-$nImgW)/2+$x, 0); |
|
| 302 | $yImg = $y+3; |
|
| 303 | $x1 = $x; |
|
| 304 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 305 | $tw = $w; |
|
| 306 | } |
|
| 307 | if ($this->logoAlign=='R') { |
|
| 308 | $nImgW = round($w/3, 0); |
|
| 309 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 310 | $xImg = round($x+($w-(1+$nImgW)), 0); |
|
| 311 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 312 | $x1 = $x; |
|
| 313 | $y1 = round($h/3+$y, 0); |
|
| 314 | $tw = round(2*$w/3, 0); |
|
| 315 | } |
|
| 316 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 317 | } else { |
|
| 318 | $x1 = $x; |
|
| 319 | $y1 = round($h/3+$y, 0); |
|
| 320 | $tw = $w; |
|
| 321 | } |
|
| 322 | $aFont = array('font'=>$this->fontePadrao, 'size'=>8, 'style'=>''); |
|
| 323 | $razao = $this->xNome; |
|
| 324 | $cnpj = 'CNPJ: '.$this->pFormat($this->CNPJ, "###.###.###/####-##"); |
|
| @@ 447-486 (lines=40) @@ | ||
| 444 | $h=20; |
|
| 445 | $oldY += $h; |
|
| 446 | $this->pTextBox($x, $y, $w, $h); |
|
| 447 | if (is_file($this->logomarca)) { |
|
| 448 | $logoInfo = getimagesize($this->logomarca); |
|
| 449 | //largura da imagem em mm |
|
| 450 | $logoWmm = ($logoInfo[0]/72)*25.4; |
|
| 451 | //altura da imagem em mm |
|
| 452 | $logoHmm = ($logoInfo[1]/72)*25.4; |
|
| 453 | if ($this->logoAlign=='L') { |
|
| 454 | $nImgW = round($w/4.5, 0); |
|
| 455 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 456 | $xImg = $x+1; |
|
| 457 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 458 | //estabelecer posições do texto |
|
| 459 | $x1 = round($xImg + $nImgW +1, 0); |
|
| 460 | $y1 = round($y+2, 0); |
|
| 461 | $tw = round(2*$w/3, 0); |
|
| 462 | } |
|
| 463 | if ($this->logoAlign=='C') { |
|
| 464 | $nImgH = round($h/3, 0); |
|
| 465 | $nImgW = round($logoWmm * ($nImgH/$logoHmm), 0); |
|
| 466 | $xImg = round(($w-$nImgW)/2+$x, 0); |
|
| 467 | $yImg = $y+3; |
|
| 468 | $x1 = $x; |
|
| 469 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 470 | $tw = $w; |
|
| 471 | } |
|
| 472 | if ($this->logoAlign=='R') { |
|
| 473 | $nImgW = round($w/3, 0); |
|
| 474 | $nImgH = round($logoHmm * ($nImgW/$logoWmm), 0); |
|
| 475 | $xImg = round($x+($w-(1+$nImgW)), 0); |
|
| 476 | $yImg = round(($h-$nImgH)/2, 0)+$y; |
|
| 477 | $x1 = $x; |
|
| 478 | $y1 = round($h/3+$y, 0); |
|
| 479 | $tw = round(2*$w/3, 0); |
|
| 480 | } |
|
| 481 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 482 | } else { |
|
| 483 | $x1 = $x; |
|
| 484 | $y1 = round($h/3+$y, 0); |
|
| 485 | $tw = $w; |
|
| 486 | } |
|
| 487 | $aFont = array('font'=>$this->fontePadrao, 'size'=>8, 'style'=>''); |
|
| 488 | $razao = $this->xNome; |
|
| 489 | $cnpj = 'CNPJ: '.$this->pFormat($this->CNPJ, "###.###.###/####-##"); |
|
| @@ 264-303 (lines=40) @@ | ||
| 261 | $this->pTextBox($x, $y, $w, $h); |
|
| 262 | $texto = 'IDENTIFICAÇÃO DO EMITENTE'; |
|
| 263 | $this->pTextBox($x, $y, $w, 5, $texto, $aFont, 'T', 'C', 0, ''); |
|
| 264 | if (is_file($this->logomarca)) { |
|
| 265 | $logoInfo = getimagesize($this->logomarca); |
|
| 266 | // largura da imagem em mm |
|
| 267 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
| 268 | // altura da imagem em mm |
|
| 269 | $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
| 270 | if ($this->logoAlign == 'L') { |
|
| 271 | $nImgW = round($w / 3, 0); |
|
| 272 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 273 | $xImg = $x + 1; |
|
| 274 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 275 | // estabelecer posições do texto |
|
| 276 | $x1 = round($xImg + $nImgW + 1, 0); |
|
| 277 | $y1 = round($h / 3 + $y, 0); |
|
| 278 | $tw = round(2 * $w / 3, 0); |
|
| 279 | } |
|
| 280 | if ($this->logoAlign == 'C') { |
|
| 281 | $nImgH = round($h / 3, 0); |
|
| 282 | $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
| 283 | $xImg = round(($w - $nImgW) / 2 + $x, 0); |
|
| 284 | $yImg = $y + 3; |
|
| 285 | $x1 = $x; |
|
| 286 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 287 | $tw = $w; |
|
| 288 | } |
|
| 289 | if ($this->logoAlign == 'R') { |
|
| 290 | $nImgW = round($w / 3, 0); |
|
| 291 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 292 | $xImg = round($x + ($w - (1 + $nImgW)), 0); |
|
| 293 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 294 | $x1 = $x; |
|
| 295 | $y1 = round($h / 3 + $y, 0); |
|
| 296 | $tw = round(2 * $w / 3, 0); |
|
| 297 | } |
|
| 298 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH); |
|
| 299 | } else { |
|
| 300 | $x1 = $x; |
|
| 301 | $y1 = round($h / 3 + $y, 0); |
|
| 302 | $tw = $w; |
|
| 303 | } |
|
| 304 | // Nome emitente |
|
| 305 | $aFont = ['font' => $this->fontePadrao,'size' => 12,'style' => 'B']; |
|
| 306 | $texto = $this->aEnd['razao']; |
|
| @@ 291-330 (lines=40) @@ | ||
| 288 | $this->pTextBox($x, $y, $w, $h); |
|
| 289 | $texto = 'IDENTIFICAÇÃO DO EMITENTE'; |
|
| 290 | $this->pTextBox($x, $y, $w, 5, $texto, $aFont, 'T', 'C', 0, ''); |
|
| 291 | if (is_file($this->logomarca)) { |
|
| 292 | $logoInfo = getimagesize($this->logomarca); |
|
| 293 | // largura da imagem em mm |
|
| 294 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
| 295 | // altura da imagem em mm |
|
| 296 | $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
| 297 | if ($this->logoAlign == 'L') { |
|
| 298 | $nImgW = round($w / 3, 0); |
|
| 299 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 300 | $xImg = $x + 1; |
|
| 301 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 302 | // estabelecer posições do texto |
|
| 303 | $x1 = round($xImg + $nImgW + 1, 0); |
|
| 304 | $y1 = round($h / 3 + $y, 0); |
|
| 305 | $tw = round(2 * $w / 3, 0); |
|
| 306 | } |
|
| 307 | if ($this->logoAlign == 'C') { |
|
| 308 | $nImgH = round($h / 3, 0); |
|
| 309 | $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
| 310 | $xImg = round(($w - $nImgW) / 2 + $x, 0); |
|
| 311 | $yImg = $y + 3; |
|
| 312 | $x1 = $x; |
|
| 313 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 314 | $tw = $w; |
|
| 315 | } |
|
| 316 | if ($this->logoAlign == 'R') { |
|
| 317 | $nImgW = round($w / 3, 0); |
|
| 318 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 319 | $xImg = round($x + ($w - (1 + $nImgW)), 0); |
|
| 320 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 321 | $x1 = $x; |
|
| 322 | $y1 = round($h / 3 + $y, 0); |
|
| 323 | $tw = round(2 * $w / 3, 0); |
|
| 324 | } |
|
| 325 | $this->pdf->image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 326 | } else { |
|
| 327 | $x1 = $x; |
|
| 328 | $y1 = round($h / 3 + $y, 0); |
|
| 329 | $tw = $w; |
|
| 330 | } |
|
| 331 | // Nome emitente |
|
| 332 | $aFont = array( |
|
| 333 | 'font' => $this->fontePadrao, |
|
| @@ 568-605 (lines=38) @@ | ||
| 565 | //desenha a caixa |
|
| 566 | $this->pTextBox($x, $y, $w + 2, $h + 1); |
|
| 567 | // coloca o logo |
|
| 568 | if (is_file($this->logomarca)) { |
|
| 569 | $logoInfo = getimagesize($this->logomarca); |
|
| 570 | //largura da imagem em mm |
|
| 571 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
| 572 | //altura da imagem em mm |
|
| 573 | $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
| 574 | if ($this->logoAlign == 'L') { |
|
| 575 | $nImgW = round($w / 3, 0); |
|
| 576 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 577 | $xImg = $x + 1; |
|
| 578 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 579 | //estabelecer posições do texto |
|
| 580 | $x1 = round($xImg + $nImgW + 1, 0); |
|
| 581 | $y1 = round($h / 3 + $y, 0); |
|
| 582 | $tw = round(2 * $w / 3, 0); |
|
| 583 | } elseif ($this->logoAlign == 'C') { |
|
| 584 | $nImgH = round($h / 3, 0); |
|
| 585 | $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
| 586 | $xImg = round(($w - $nImgW) / 2 + $x, 0); |
|
| 587 | $yImg = $y + 3; |
|
| 588 | $x1 = $x; |
|
| 589 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 590 | $tw = $w; |
|
| 591 | } elseif ($this->logoAlign == 'R') { |
|
| 592 | $nImgW = round($w / 3, 0); |
|
| 593 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 594 | $xImg = round($x + ($w - (1 + $nImgW)), 0); |
|
| 595 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 596 | $x1 = $x; |
|
| 597 | $y1 = round($h / 3 + $y, 0); |
|
| 598 | $tw = round(2 * $w / 3, 0); |
|
| 599 | } |
|
| 600 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH, 'jpeg'); |
|
| 601 | } else { |
|
| 602 | $x1 = $x; |
|
| 603 | $y1 = round($h / 3 + $y, 0); |
|
| 604 | $tw = $w; |
|
| 605 | } |
|
| 606 | //Nome emitente |
|
| 607 | $aFont = array( |
|
| 608 | 'font' => $this->fontePadrao, |
|
| @@ 262-301 (lines=40) @@ | ||
| 259 | $this->pTextBox($x, $y, $w, $h); |
|
| 260 | $texto = 'IDENTIFICAÇÃO DO EMITENTE'; |
|
| 261 | $this->pTextBox($x, $y, $w, 5, $texto, $aFont, 'T', 'C', 0, ''); |
|
| 262 | if (is_file($this->logomarca)) { |
|
| 263 | $logoInfo = getimagesize($this->logomarca); |
|
| 264 | // largura da imagem em mm |
|
| 265 | $logoWmm = ($logoInfo[0] / 72) * 25.4; |
|
| 266 | // altura da imagem em mm |
|
| 267 | $logoHmm = ($logoInfo[1] / 72) * 25.4; |
|
| 268 | if ($this->logoAlign == 'L') { |
|
| 269 | $nImgW = round($w / 3, 0); |
|
| 270 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 271 | $xImg = $x + 1; |
|
| 272 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 273 | // estabelecer posições do texto |
|
| 274 | $x1 = round($xImg + $nImgW + 1, 0); |
|
| 275 | $y1 = round($h / 3 + $y, 0); |
|
| 276 | $tw = round(2 * $w / 3, 0); |
|
| 277 | } |
|
| 278 | if ($this->logoAlign == 'C') { |
|
| 279 | $nImgH = round($h / 3, 0); |
|
| 280 | $nImgW = round($logoWmm * ($nImgH / $logoHmm), 0); |
|
| 281 | $xImg = round(($w - $nImgW) / 2 + $x, 0); |
|
| 282 | $yImg = $y + 3; |
|
| 283 | $x1 = $x; |
|
| 284 | $y1 = round($yImg + $nImgH + 1, 0); |
|
| 285 | $tw = $w; |
|
| 286 | } |
|
| 287 | if ($this->logoAlign == 'R') { |
|
| 288 | $nImgW = round($w / 3, 0); |
|
| 289 | $nImgH = round($logoHmm * ($nImgW / $logoWmm), 0); |
|
| 290 | $xImg = round($x + ($w - (1 + $nImgW)), 0); |
|
| 291 | $yImg = round(($h - $nImgH) / 2, 0) + $y; |
|
| 292 | $x1 = $x; |
|
| 293 | $y1 = round($h / 3 + $y, 0); |
|
| 294 | $tw = round(2 * $w / 3, 0); |
|
| 295 | } |
|
| 296 | $this->pdf->Image($this->logomarca, $xImg, $yImg, $nImgW, $nImgH); |
|
| 297 | } else { |
|
| 298 | $x1 = $x; |
|
| 299 | $y1 = round($h / 3 + $y, 0); |
|
| 300 | $tw = $w; |
|
| 301 | } |
|
| 302 | // Nome emitente |
|
| 303 | $aFont = ['font' => $this->fontePadrao,'size' => 12,'style' => 'B']; |
|
| 304 | $texto = $this->aEnd['razao']; |
|