// set document information $pdf->SetCreator('2014 ACP Committee'); $pdf->SetAuthor('2014 ACP Committee'); $pdf->SetTitle('Invitation Letter'); $pdf->SetSubject(''); $pdf->SetKeywords(''); // set default header data $pdf->SetHeaderData('header.jpg', PDF_HEADER_LOGO_WIDTH, '' . '', '', array(255, 255, 255), array(255, 255, 255)); $pdf->setFooterData(array(23, 54, 93), array(255, 255, 255)); // set header and footer fonts $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(array($fontname, '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(1); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // --------------------------------------------------------- // set default font subsetting mode $pdf->setFontSubsetting(true); // Set font // dejavusans is a UTF-8 Unicode font, if you only need to // print standard ASCII chars, you can use core fonts like // helvetica or times to reduce file size. $pdf->SetFont('times', '', 11, '', true); // Add a page
$this->SetFont('Arial', '', 11); } } } function saison() { $annee = intval(date("Y")); $mois = intval(date("m")); if ($mois < 7) { $annee = $annee - 1; } $annee2 = $annee + 1; return "{$annee}/{$annee2}"; } $pdf = new myPDF('P', 'mm', 'A4'); $pdf->SetMargins(20, 15); $pdf->AddPage(); $pdf->image("../logoaikido.png", 20, 10, 28.1); $pdf->SetFont('Helvetica', 'B', 28); $pdf->Text(89, 15, iconv('UTF-8', 'windows-1252', 'AÏKIDO')); $pdf->Text(65, 25, 'Saint Cyr Club 78'); $pdf->SetFontSize(18); $pdf->Text(90, 35, '(ASCC78)'); $pdf->Text(75, 50, 'FICHE D\'INSCRIPTION'); $pdf->Text(78, 57, 'SAISON ' . saison()); $pdf->SetFont('Arial', '', 11); $pdf->SetXY(20, 70); $pdf->ecrire("Nom: "); $pdf->getValue("nom"); $pdf->SetX(88); $pdf->ecrire("Prénom: ");