Ir para conteúdo

FamiluMoura

Members
  • Total de itens

    40
  • Registro em

  • Última visita

Tudo que FamiluMoura postou

  1. FamiluMoura

    Problema com mPdf no composer

    Tenho um projeto em MVC aonde instalei a biblioteca mPdf, gerar o arquivo pdf normalmente e abre no Edge, porem qdo vou abrir no Adobe ele diz que o arquivo esta corrompido ou não tem suporte para este tipo de arquivo. O erro aconte ate mesmo com o exemplo da Biblioteca do mpdf o código abaixo e genérico do CriarPdf.php public function pdf(array $Dados) { $this->Dados = $Dados; try { $mpdf = new \Mpdf\Mpdf([ 'format' => [150, 130], 'mode' => 'c', 'margin_left' => 5, 'margin_right' => 5, 'margin_top' => 26, 'margin_bottom' => 15, 'margin_header' => 5, 'margin_footer' => 5, ]); $html = '<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style> @page {size: auto;odd-header-name: html_myHeader1;odd-footer-name: html_myFooter1;} .size-10{font-size: 10px;} .size-16{font-size: 25px;color:#FF0000;} .negrito{font-weight: bold;} .espaco{margin: 20px;} .linha{width: 100%;border: 1px solid #000000;} .col-2 {float: left;width: 8.333333%;} .col-3 {float: left;width: 25%;} .col-4{float: left;width: 33%;} .col-6 {float: left;width: 50%;} .col-8{float: left;width: 66%;} .text-center {text-align: center !important;} .text-right {text-align: right !important;} .imgTamanho{width: 50%;} a{padding: 5px;text-decoration: none;} td{padding: 5px;} .border-bottom{border-bottom: 1px solid #000000;} </style> </head> <body> <htmlpageheader name="myHTMLHeader1"> <table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"> <tr> <td width="100%">"Logo da Empresa no Cabeçalho"</td> </tr> </table> </htmlpageheader> <htmlpagefooter name="myHTMLFooter1"> <table width="100%" style="border-top: 1px solid #000000; vertical-align: top; font-family: sans; font-size: 8pt;"> <tr> <td width="100%" align="center"><span style="font-size:12pt">' . $this->Dados['imagem'] . '</span></td> </tr> </table> </htmlpagefooter> <!-- set the headers/footers - they will occur from here on in the document --> <!--mpdf <sethtmlpageheader name="myHTMLHeader1" page="O" value="on" show-this-page="1" /> <sethtmlpageheader name="myHTMLHeader1Even" page="E" value="on" /> <sethtmlpagefooter name="myHTMLFooter1" page="O" value="on" show-this-page="1" /> <sethtmlpagefooter name="myHTMLFooter1" page="E" value="on" /> mpdf--> <table width="600px"> <tr> <td class="text-center" >' . $this->Dados['corpo'] . '</td> //Aqui uma tabela que envio para criar o pdf </tr> </table> </body> </html> $mpdf->WriteHTML($html); $mpdf->Output(); } catch (\Mpdf\MpdfException $e) { // Note: safer fully qualified exception name used for catch // Process the exception, log, print etc. echo $e->getMessage(); }
  2. FamiluMoura

    Problema com mPdf no composer

    também já fiz debug e Não retorna nenhum erro
  3. FamiluMoura

    Problema com mPdf no composer

    Já fiz essas mudanças no código e não adiantou. acabei achando alguns blog, aonde dizia a versão tanto do mpdf quanto a do adobe, mas o meu mpdf versão 8.0.4 e o adobe e a ultima porem quando eu reparo o arquivo na pagina online ele abre no adobe.
  4. FamiluMoura

    Select com php e json numa modal

    Blz. Tenho um script php. só que gostaria de colocar um select que tem as informações que vem do banco de dados dentro de uma modal. Não estou conseguindo fazer isso
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.