Commit 6576a771e21645793cb832abe47e89d0d51a69e9
1 parent
d7e56843
Exists in
2.8
and in
6 other branches
Corrigido bug que não permitia imprimir agenda
Showing
4 changed files
with
13 additions
and
2 deletions
Show diff stats
docker/php/Dockerfile
... | ... | @@ -52,3 +52,6 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local |
52 | 52 | COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini |
53 | 53 | |
54 | 54 | COPY php.ini /usr/local/etc/php/php.ini |
55 | + | |
56 | +COPY pdflib.so /usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdflib.so | |
57 | +RUN echo "extension=/usr/local/lib/php/extensions/no-debug-non-zts-20180731/pdflib.so" > /usr/local/etc/php/conf.d/pdflib.ini | ... | ... |
No preview for this file type
ieducar/intranet/include/clsPDF.inc.php
... | ... | @@ -145,7 +145,7 @@ class clsPDF |
145 | 145 | // Construção de página normal |
146 | 146 | $this->ClosePage(); |
147 | 147 | $this->numeroPagina++; |
148 | - PDF_begin_page($this->pdf, $this->largura, $this->altura); | |
148 | + PDF_begin_page_ext($this->pdf, $this->largura, $this->altura, ""); | |
149 | 149 | $this->pagOpened = TRUE; |
150 | 150 | } |
151 | 151 | else { |
... | ... | @@ -372,6 +372,10 @@ class clsPDF |
372 | 372 | */ |
373 | 373 | public function insertImageScaled($tipo, $image, $x, $y, $maxWidth) |
374 | 374 | { |
375 | + if ($image == "") { | |
376 | + throw new Exception('Parametro $image vazio'); | |
377 | + } | |
378 | + | |
375 | 379 | $image = realpath($image); |
376 | 380 | if (! is_readable($image)) { |
377 | 381 | throw new Exception('Caminho para arquivo de imagem inválido: "' . $image . '"'); | ... | ... |
ieducar/intranet/include/relatorio.inc.php
... | ... | @@ -117,7 +117,11 @@ class relatorios |
117 | 117 | $this->pdf->Write( $this->numeroPagina, $this->pdf->largura - $this->margem_direita - 25, 125, 15, 80, $this->fonte_titulo, 10, "#000000", "center" ); |
118 | 118 | |
119 | 119 | // Insere o brasao da prefeitura |
120 | - $image = config('legacy.app.template.pdf.logo', 'imagens/brasao.gif'); | |
120 | + $brasaoDefault = 'imagens/nvp_brasao_print.gif'; | |
121 | + $image = config('legacy.app.template.pdf.logo', $brasaoDefault); | |
122 | + if ($image == '') { | |
123 | + $image = $brasaoDefault; | |
124 | + } | |
121 | 125 | $this->pdf->insertImageScaled("gif", $image, $this->margem_esquerda + 4, |
122 | 126 | 74, 45); |
123 | 127 | ... | ... |