$data = $_SESSION['data']; $data_pdf = $_SESSION['data_pdf']; $data2 = $_SESSION['data2']; $tab = $_SESSION['tab']; if ($nb_display == 5) { $orientation = 'P'; } elseif ($nb_display == 7) { $orientation = 'L'; } else { $orientation = 'L'; } include "../../phpToPDF/phpToPDF.php"; $PDF = new phpToPDF(); $PDF->AddPage($orientation); $PDF->Image("../images/logo_stluc.jpg", 10, 10, 65, 28); $PDF->SetFont('Arial', 'B', 10); $text_a = "Date : " . date("d-m-Y") . "\n"; if ($orientation == 'P') { $PDF->setXY(160, 10); } elseif ($orientation == 'L') { $PDF->setXY(260, 10); } else { $PDF->setXY(260, 10); } $PDF->MultiCell(50, 5, $text_a, 0, 1, 'C'); //Sélection de la police $PDF->SetFont('Arial', 'B', 18); if ($orientation == 'P') { $PDF->setXY(10, 40); $PDF->Cell(50); } elseif ($orientation == 'L') {
function produce_pdf() { include "pdf/phpToPDF.php"; $PDF = new phpToPDF(); $PDF->AddPage(); $PDF->SetFont("Arial", "B", 16); $PDF->Text(40, 10, "Uniquement un texte"); $PDF->Output(); //$PDF->Output("test.pdf","F"); // affiche le document test.PDF dans une iframe. /*echo ' <iframe src="test.pdf" width="100%" height="100%"> [Your browser does <em>not</em> support <code>iframe</code>, or has been configured not to display inline frames. You can access <a href="./test.PDF">the document</a> via a link though.]</iframe> ';*/ }
<br/> <div id="redtab" > <p style="padding:5;"> DONE ! </p> </div> <div id="redbotle" style="color:#000"> <?php if (isset($_COOKIE['Etat']) && $_COOKIE['Etat'] == 1) { include 'phpToPDF.php'; $pdf = new phpToPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->MultiCell(0, 10, "Merci D'avoir Considérer Nos Service!\nVoici Les Jeux Videos que Vous venez D acheter\n", 1, "C", 0); $pdf->Cell("\n\n\n"); // Définition des propriétés du tableau. $proprietesTableau = array('TB_ALIGN' => 'L', 'L_MARGIN' => 15, 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => '0.3'); // Définition des propriétés du header du tableau. $proprieteHeader = array('T_COLOR' => array(150, 10, 10), 'T_SIZE' => 10, 'T_FONT' => 'Arial', 'T_ALIGN' => 'C', 'V_ALIGN' => 'T', 'T_TYPE' => 'B', 'LN_SIZE' => 20, 'BG_COLOR_COL0' => array(170, 240, 230), 'BG_COLOR' => array(170, 240, 230), 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => 0.2, 'BRD_TYPE' => '1', 'BRD_TYPE_NEW_PAGE' => ''); // Contenu du header du tableau. $contenuHeader = array(30, 30, 40, 50, "Jeu", "Quantité", "Prix/U", "Console"); // Définition des propriétés du reste du contenu du tableau. $proprieteContenu = array('T_COLOR' => array(0, 0, 0), 'T_SIZE' => 10, 'T_FONT' => 'Arial', 'T_ALIGN_COL0' => 'L', 'T_ALIGN' => 'R', 'V_ALIGN' => 'M', 'T_TYPE' => '', 'LN_SIZE' => 10, 'BG_COLOR_COL0' => array(245, 245, 150), 'BG_COLOR' => array(255, 255, 255), 'BRD_COLOR' => array(0, 92, 177), 'BRD_SIZE' => 0.1, 'BRD_TYPE' => '1', 'BRD_TYPE_NEW_PAGE' => ''); // Contenu du tableau. $tmp = array(); for ($i = 0; $i < count($_SESSION['panier']['nomProduit']); $i++) { array_push($tmp, $_SESSION['panier']['nomProduit'][$i]); array_push($tmp, $_SESSION['panier']['qteProduit'][$i]); array_push($tmp, $_SESSION['panier']['prixProduit'][$i]);
// //The fact that you are presently reading this means that you have had //knowledge of the CeCILL-B license and that you accept its terms. You can //find a copy of this license in the file LICENSE. // //========================================================================== session_start(); require_once 'php2pdf/phpToPDF.php'; include_once 'fonctions.php'; $dsondage = get_sondage_from_id($_POST['numsondage']); $lieureunion = stripcslashes($_POST["lieureunion"]); $datereunion = explode("@", $_POST["meilleursujet"]); //creation du fichier PDF $PDF = new phpToPDF(); $PDF->AddPage(); $PDF->SetFont('Arial', '', 11); //affichage de la date de convocation $PDF->Text(140, 30, "Le " . date("d/m/Y")); $PDF->Image("./" . LOGOLETTRE . "", 20, 20, 65, 40); $PDF->SetFont('Arial', 'U', 11); $PDF->Text(40, 120, "Objet : "); $PDF->SetFont('Arial', '', 11); $PDF->Text(55, 120, _(' Convocation')); $PDF->Text(55, 140, _('Hello,')); $PDF->Text(40, 150, _("You're invited at the meeting") . ' "' . utf8_decode($dsondage->titre) . '".'); $PDF->SetFont('Arial', 'B', 11); $PDF->Text(40, 170, _('Informations about the meeting')); $PDF->SetFont('Arial', '', 11); $PDF->Text(60, 180, _('Date') . ' : ' . date("d/m/Y", "{$datereunion['0']}") . ' ' . _('at') . ' ' . $datereunion[1]); $PDF->Text(60, 185, _('Place') . ' : ' . utf8_decode($lieureunion)); $PDF->Text(55, 220, _('Cordially,'));