AliasNbPages(); $PDF->AddPage(); //$PDF->temporaire( "www.dyon.be" ); // bande grise gauche $PDF->Image('imgs/fond_pdf_fiche_prod.jpg', 0, 0, 70, 1000); // titre collection if ($row_produits['id_lang']==3) { $col = $row_produits['location']." Kollektion"; } else { $col = $row_produits['location']." Collection"; } $PDF->SetFont('Engrav','',14); $PDF->SetLeftMargin(10); $PDF->Ln(1); $PDF->WriteHTML2($col); $dos = $row_imgs_prod['id_image']; $n = strlen($dos); if ($n==1) { $dir = $row_imgs_prod['id_image']; $img = "img/p/".$dir."/".$row_imgs_prod['id_image'].".jpg"; } elseif ($n==2) { $id = $row_imgs_prod['id_image']; $dir1 = substr($id,0,1); $dir2 = substr($id,1,1); $img = "img/p/".$dir1."/".$dir2."/".$row_imgs_prod['id_image'].".jpg"; } elseif ($n==3) { $id = $row_imgs_prod['id_image']; $dir1 = substr($id,0,1); $dir2 = substr($id,1,1); $dir3 = substr($id,2,3); $img = "img/p/".$dir1."/".$dir2."/".$dir3."/".$row_imgs_prod['id_image'].".jpg"; } // $img="img/p/2/5/25.jpg";--> list($width, $height, $type, $attr) = getimagesize($img); $c = $width/75; //$PDF->WriteHTML2($height); $H = $height/$c; $PDF->Image($img,10,35,75,$H); $PDF->Rect(10,35, 75,$H,'D'); //fin photo produit--------------------------------------------------------------------------------------------------- //band fond titre $img="imgs/fond_titre_pdf.png"; $PDF->Image($img,98, 19, 120, 9); // texte produit (description du produit)***************************************************************************** $texte = $row_produits['description_short']; $texte2 = $row_produits['description']; $name = $row_produits['name']; $ref = "REF. ".$row_produits['reference']; //nom prod $PDF->SetFont('Engrav','',13); $PDF->SetTextColor(255,255,255); $PDF->SetLeftMargin(100); $PDF->Ln(10); $PDF->WriteHTML2($name); //ref prod $PDF->SetFont('Helvetica','',12); $PDF->SetTextColor(0,0,0); $PDF->SetLeftMargin(100); $PDF->Ln(8); $PDF->WriteHTML2($ref); //DES1 prod $PDF->SetFont('Helvetica','',12);; $PDF->SetTextColor(0,0,0); $PDF->SetLeftMargin(100); $PDF->Ln(4); $PDF->WriteHTML2($texte); //DES1 prod $PDF->SetLeftMargin(75); $PDF->Ln(70); $PDF->SetFont('Helvetica','',12); $PDF->WriteHTML2($texte2); //fin txt2 -------------------------------------------------------------------------------------------------------------------- //pour le footer voir dans phptoPDF.php $PDF->Output($col.' - '.$name,'I'); ?>