1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| <?php
mysql_connect("localhost", "root", "");
mysql_select_db("bd_test");
include 'class.ezpdf.php';
$pdf = & new Cezpdf();
$pdf -> ezText('Archives en PDF', 18);
$pdf -> ezText('___________________________________________________', 18);
$pdf -> ezText('
', 18);
$pdf ->addText(550,280,20, '| www.test.com |', 90);
//------------ ID ----------------------//
$id = $_GET['id'];
//$pdf ->addText(100, 200, 12, $id, 0,10);
$reponse = mysql_query("SELECT * FROM tb_archives WHERE id='$id'");
$donnees = mysql_fetch_array($reponse);
//------------ DESCRIPTION ----------------------//
$description = $donnees['description'];
$tab = array (
'left' => 50,
'right' => 50,
'justification' => 'left',
'spacing' => 1.0);
$pdf -> ezText($description, 15, $tab);
//------------ MOIs ----------------------//
$pdf ->addText(100, 550, 12, 'Mois', 0,10);
$pdf ->addText(135, 550, 12, ':', 0,10);
$mois = $donnees['mois'];
$pdf ->addText(150, 550, 12, $mois, 0,10);
//------------ LIEN ----------------------//
$pdf ->addText(100, 530, 12, 'Lien', 0,10);
$pdf ->addText(135, 530, 12, ':', 0,10);
$lien = $donnees['lien'];
$pdf ->addText(150, 530, 12, $lien, 0,10);
//------------ TYPE ----------------------//
$pdf ->addText(100, 510, 12, 'Type', 0,10);
$pdf ->addText(135, 510, 12, ':', 0,10);
$type = $donnees['type'];
$pdf ->addText(150, 510, 12, $type, 0,10);
//----------------- Num page ----------------------------//
$pdf ->ezStartPageNumbers(100,30,12,'left','Page {PAGENUM} sur {TOTALPAGENUM}');
//----------------- FORCE l'AFFICHAGE ------------------//
$pdf ->openHere('Fit');
$pdf -> ezStream();
?> |
Partager