Esempio n. 1
0
<br>
<br>
<TD>Name:' . $_POST['NameChild'] . '<br><br></TD>
<TD>Date:' . $_POST['DateChild'] . '<br><br><br><br></TD>
</TR>
</TABLE>
<br>
<pre>
<br>
1.Feeling down or depressed or hopeless-' . $_POST['Q1'] . '<br><br>
2.Little interest or pleasure in doing things-' . $_POST['Q2'] . '<br><br>
3. Trouble falling or staying asleep, or sleeping too much-' . $_POST['Q3'] . '<br><br>
4. Feeling tired or having little energy-' . $_POST['Q4'] . '<br><br>
5. Poor appetite or overeating-' . $_POST['Q5'] . '<br><br>
6. Feeling bad about yourself ot that you are a failure or have <br><br>
   let yourself or your family down-' . $_POST['Q6'] . '<br><br>
7. Trouble concentrating on things such as reading <br><br>
   newspaper or watching TV-' . $_POST['Q7'] . '<br><br>
8. Moving or speaking so slowly that other people could have<br><br>
   noticed? Or the oppsite, being so fidgety or restless that<br><br>
   you have been moving around a lot more than usual-' . $_POST['Q8'] . '<br><br>
9. Thoughts that you would be better off dead or of hurting<br><br>
   yourself in some way-' . $_POST['Q9'] . '<br><br></pre>';
$pdf->WriteHTML("<br><br><br>{$htmlTable1}");
$pdf->SetFont('Arial', 'B', 18);
$pdf->WriteHTML("<br>Total score is = {$total}");
$pdf->Output($pdfname);
?>


                    $titulo = "CERTIFICADO";
                    $corpo = utf8_decode("Certificamos que <b>{$nome_convertido}</b> participou do evento " . NOME_EVENTO . ", realizado " . PERIODO_EVENTO . ", " . LOCAL_EVENTO . ", com carga horária de " . CARGA_HORARIA_EVENTO . " horas, na qualidade de <b>{$perfil}</b>{$palestra}.");
                    // Titulo
                    $pdf->SetFont('Arial', 'B', 32);
                    $pdf->SetTextColor(35, 142, 35);
                    //Verde Floresta
                    $pdf->SetXY(110, 35);
                    $pdf->Write(0, $titulo);
                    // Corpo do texto
                    $pdf->SetFont('Arial', '', 22);
                    $pdf->SetTextColor(35, 142, 35);
                    //Verde Floresta
                    $pdf->SetY("65");
                    $pdf->SetX("20");
                    $pdf->WriteHTML($corpo, 9);
                    $pdf->Output($arquivo_destino, 'F');
                    $retorno = EnviarEmail::enviar("envio_certificado", "", $email, $nome, 0, "", $arquivo_destino);
                    if (file_exists($arquivo_destino)) {
                        unlink($arquivo_destino);
                    }
                    echo "<br><br>O certificado de {$perfil} de <b>" . utf8_encode($nome) . "</b>" . ($retorno ? "" : " nao") . " foi enviado com sucesso";
                }
            }
        }
    }
    exit;
}
?>
<!DOCTYPE html>
<html lang="pt-br">
  <head>
Esempio n. 3
0
$pdf = new PDF_HTML();
$pdf->AliasNbPages();
$pdf->SetAutoPageBreak(true, 15);
$pdf->AddPage();
$pdf->Image('logo.png', 18, 13, 33);
$pdf->SetFont('Arial', 'B', 14);
$pdf->WriteHTML('<para><h1>PHPGang Programming Blog, Tutorials, jQuery, Ajax, PHP, MySQL and Demos</h1><br>
Website: <u>www.phpgang.com</u></para><br><br>How to Convert HTML to PDF with fpdf example');
$pdf->SetFont('Arial', 'B', 7);
$htmlTable = '<TABLE>
<TR>
<TD>Name:</TD>
<TD>' . $_POST['name'] . '</TD>
</TR>
<TR>
<TD>Email:</TD>
<TD>' . $_POST['email'] . '</TD>
</TR>
<TR>
<TD>URl:</TD>
<TD>' . $_POST['url'] . '</TD>
</TR>
<TR>
<TD>Comment:</TD>
<TD>' . $_POST['comment'] . '</TD>
</TR>
</TABLE>';
$pdf->WriteHTML2("<br><br><br>{$htmlTable}");
$pdf->SetFont('Arial', 'B', 6);
$pdf->Output();
Esempio n. 4
0
<?php

require ('WriteHTML.php');

$pdf = new PDF_HTML ();
$pdf->AddPage ();
$pdf->SetFont ( 'Arial' );

$html1 = 'Default <font face="courier">Courier <font face="helvetica">Helvetica <font face="times">Times <font face="dejavusans">dejavusans </font>Times </font>Helvetica </font>Courier </font>Default';
$html2 = '<small>small text</small> normal <small>small text</small> normal <sub>subscript</sub> normal <sup>superscript</sup> normal';
$html3 = "<font size='10' color='#ff7f50'>The</font> <font size='10' color='#6495ed'>quick</font> <font size='14' color='#dc143c'>brown</font> <font size='18' color='#008000'>fox</font> <font size='22'><a href='http://www.tcpdf.org'>jumps</a></font> <font size='22' color='#a0522d'>over</font> <font size='18' color='#da70d6'>the</font> <font size='14' color='#9400d3'>lazy</font> <font size='10' color='#4169el'>dog</font>.";

$html = $html1 . '<br>' . $html2 . '<br>' . $html3 . '<br>' . $html3 . '<br>' . $html2;

// output the HTML content
$pdf->writeHTML ( $html, true, false, true, false, '' );
$pdf->Output ( 'materia-PDF.pdf', 'I' );
?>
Esempio n. 5
0
function leerdoc($documento)
{
    //require('fpdf/fpdf.php');
    require_once 'rtf2html.php';
    require_once 'aux_pdf.php';
    $reader = new RtfReader();
    $rtf = file_get_contents("{$documento}");
    // or use a string
    $reader->Parse($rtf);
    $formatter = new RtfHtml();
    $pdf = new PDF_HTML();
    $pdf->SetFont('Arial', '', 12);
    $pdf->AddPage();
    $text = $formatter->Format($reader->root);
    if (ini_get('magic_quotes_gpc') == '1') {
        $text = stripslashes($text);
    }
    $pdf->WriteHTML($text);
    $pdf->Output();
    exit;
}
     $pdf->Output('../sauvegarde/animaux/' . $_POST['animal_id'] . '/euthanasie_' . $variable . '.pdf', F);
     echo json_encode($variable);
 } elseif ($_GET['action'] == 'autre_certif') {
     $filename = '../sauvegarde/animaux/' . $_POST['animal_id'];
     $variable = round(microtime(true));
     //$info_client = json_decode($info_client, true);
     if (!file_exists($filename)) {
         if (!mkdir($filename, 0755, true)) {
             die('Echec lors de la création des répertoires...');
         }
     }
     $pdf = new PDF_HTML();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     $pdf->WriteHTML(utf8_decode(stripslashes($_POST['message'])));
     $pdf->Output('../sauvegarde/animaux/' . $_POST['animal_id'] . '/certificat_' . $variable . '.pdf', F);
     echo json_encode($variable);
 } elseif ($_GET['action'] == 'drop_client_animal') {
     $info_client = $_POST['client'];
     $sql = " CREATE TEMPORARY TABLE tmptable_1 SELECT * FROM client WHERE id2 = :clien_id;\r\n\tUPDATE tmptable_1 SET id2 = NULL, permission2=:permission;\t\r\n\tINSERT INTO client SELECT * FROM tmptable_1;\r\n\tDROP TEMPORARY TABLE IF EXISTS tmptable_1;";
     $st2 = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
     $st2->execute(array(':clien_id' => $info_client[0]['id2'], ':permission' => $_SESSION['login']));
     $st2->closeCursor();
     $sql = " CREATE TEMPORARY TABLE tmptable_2 SELECT * FROM animal WHERE id = :animal_id;\r\n\tUPDATE tmptable_2 SET id = NULL, permission=:permission ;\t\r\n\tINSERT INTO animal SELECT * FROM tmptable_2;\r\n\tDROP TEMPORARY TABLE IF EXISTS tmptable_2;";
     $st2 = $db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
     $st2->execute(array(':animal_id' => $_POST['animal_id'], ':permission' => $_SESSION['login']));
     $st2->closeCursor();
     $sql = "SELECT * FROM client ORDER BY id2 DESC LIMIT 1";
     $st2 = $db->prepare($sql);
     $st2->execute();
     $client = $st2->fetchAll();
Esempio n. 7
0
<br>
<TD>Name:' . $_POST['NameChild'] . '<br><br></TD>
<TD>Date:' . $_POST['DateChild'] . '<br><br><br><br></TD>
</TR>
</TABLE>
<br>
<pre>
<br>
1.Feeling down or depressed or hopeless-' . $_POST['Q1'] . '<br><br>
2.Little interest or pleasure in doing things-' . $_POST['Q2'] . '<br><br>
3. Trouble falling or staying asleep, or sleeping too much-' . $_POST['Q3'] . '<br><br>
4. Feeling tired or having little energy-' . $_POST['Q4'] . '<br><br>
5. Poor appetite or overeating-' . $_POST['Q5'] . '<br><br>
6. Feeling bad about yourself ot that you are a failure or have <br><br>
   let yourself or your family down-' . $_POST['Q6'] . '<br><br>
7. Trouble concentrating on things such as reading <br><br>
   newspaper or watching TV-' . $_POST['Q7'] . '<br><br>
8. Moving or speaking so slowly that other people could have<br><br>
   noticed? Or the oppsite, being so fidgety or restless that<br><br>
   you have been moving around a lot more than usual-' . $_POST['Q8'] . '<br><br>
9. Thoughts that you would be better off dead or of hurting<br><br>
   yourself in some way-' . $_POST['Q9'] . '<br><br></pre>';
$pdf->WriteHTML("<br><br><br>{$htmlTable1}");
$pdf->SetFont('Arial', 'B', 18);
$pdf->WriteHTML("<br>Total score is = {$total}");
$pdf->Output("./pdfs/" . $pdfname);
include 'xml_child.php';
?>


Esempio n. 8
0
        $pdf->SetFont('Arial', '', 14);
        $pdf->SetXY(0, 0);
        $pdf->SetFillColor(200, 220, 255);
        $pdf->Rect(0, 0, 90, 210, 'F');
        //Borda esquerda com simbolos da PROCEV - REMOVER DEPOIS
        $pdf->SetFillColor(195, 195, 195);
        $pdf->Rect(90, 0, 207, 50, 'F');
        //Texto superior - REMOVER DEPOIS
        $pdf->SetFillColor(195, 195, 195);
        $pdf->Rect(90, 160, 207, 50, 'F');
        //Texto inferior - REMOVER DEPOIS
        $pdf->SetXY(110, 70);
        //Posicao inicial do texto do certificado -- posicao x = 110mm / posicao y = 70mm
        //$txt = file_get_contents('fpdf/license.txt');
        /*$texto = "EVENTO: ".$_POST['evento']."\nDepartamento :".$_POST['departamento']."\nPeriodo :".$_POST['periodo'].
          "\nParticipante :".$value;*/
        $texto = utf8_decode("                         " . "Certifi<B>ca</B>mos que " . $participante . " participou do evento " . $_POST['evento'] . " realizado pelo " . $_POST['departamento'] . " no periodo " . $_POST['periodo'] . " com carga horaria de " . $_POST['carga'] . " horas.");
        $pdf->MultiCell(167, 9, $texto, 0, 'J', false);
        //Adiciona o texto no corpo principal do certificado
        //$pdf->WriteHTML($texto);
        $pdf->SetXY(110, $pdf->GetY() + 10);
        $pdf->Cell(167, 5, "Cuiabá-MT, " . $_POST['dataimpressa'] . ".", 0, 1, 'R', false);
        //Adiciona a data da impressão no corpo do certificado
        $pdf->AddPage();
        $pdf->SetXY(15, 25);
        $pdf->MultiCell(128, 5, $_POST['contprogramatico'], 0, 'C', false);
        $pdf->SetXY(154, 25);
        $pdf->MultiCell(128, 5, $_POST['equipe'], 0, 'C', false);
    }
    $pdf->Output("PaginaPDF", "I");
}