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
| require('include/lib/tcpdf_php4/tcpdf.php');
require('include/class/fpdf_extend.php');
$pdf= new PDF("P","pt",'A4',false,'UTF-8',false);
$pdf->AliasNbPages();
$pdf->SetAuthor('Sodexo');
$pdf->SetTitle('Awards::'.$r['title'.$lang]);
//$pdf->SetMargins(10,10,10,10);
$pdf->AddPage('P');
$pdf->SetDisplayMode('real','default');
$pdf->Image('images/pdf/award/top1.png',0,0,595,210);
$pdf->SetFillColor(0,160,198);
$pdf->SetTextColor(220,50,50);
$pdf->SetX(40);
$pdf->SetY(250);
$pdf->Cell(155,155,'',0,0,'L',true);
if(($r['photo']!="")and(file_exists('images/award/t_'.$r['photo']))){
$pdf->Image('images/award/t_'.$r['photo'],45,270,120,120);
}
$pdf->SetDrawColor(255,185,0);
$pdf->SetLineWidth(2);
$pdf->RoundedRect(45, 270, 120, 120, 12, "D", 1234);
$pdf->SetDrawColor(0,160,198);
$pdf->SetLineWidth(7);
$pdf->RoundedRect(40, 265, 130, 130, 19, "D", 1234);
$pdf->SetFont('Arial','B',20);
$pdf->SetTextColor(255,255,255);
$pdf->SetLineWidth(0);
$pdf->SetX(40);
$pdf->SetY(400);
$pdf->MultiCell(155,30,$r['country'],0,"L",1);
$pdf->MultiCell(155,20,'',0,"L",1);
$pdf->MultiCell(155,30,$r['date'],0,"L",1);
$pdf->MultiCell(155,20,'',0,"L",1);
$pdf->MultiCell(155,30,$r['category'],0,"L",1);
$pdf->SetTextColor(161,200,2);
$pdf->SetXY(200,250);
$pdf->MultiCell(340,30,$r['title'.$lang],0,"L",0);
$pdf->SetFont('Arial','',14);
$pdf->SetXY(200,310);
$pdf->SetTextColor(0,0,0);
//$r['text'.$lang]=str_replace("e",chr(232),$r['text'.$lang]);
// $r['text'.$lang]=str_replace("e",chr(232),$r['text'.$lang]);
//$pdf->MultiCell(370,20, $r['text'.$lang],0,"FJ",0);
$pdf->MultiCell(370,20, utf8_encode("text 1 fr Fr'eacdddkdk dfdf dfdfd Fr'eacdddkdk тест русских букв dfdf dfdfd Fr'eacdddkdk dfdf dfdfd"),0,"FJ",0);
$pdf->Output($award_id.'.pdf','I'); |
Partager