if($etiquette_type === '5' and $cpt_ligne_aff == '2') { $hauteur_caractere = '6'; } $pdf->SetFont('DejaVu','',$hauteur_caractere); $val = $pdf->GetStringWidth($ligne[$cpt_eleve][$cpt_ligne_aff]); $taille_texte = $largeur-2; $grandeur_texte='test'; while($grandeur_texte!='ok') { if($taille_texte<$val) { $hauteur_caractere = $hauteur_caractere-0.3; $pdf->SetFont('DejaVu','',$hauteur_caractere); $val = $pdf->GetStringWidth($ligne[$cpt_eleve][$cpt_ligne_aff]); } else { $grandeur_texte='ok'; } } $grandeur_texte='test'; $pdf->Cell($largeur, $hauteur_select, ($ligne[$cpt_eleve][$cpt_ligne_aff]),$code_cadre,0,'L'); $cpt_ligne_aff = $cpt_ligne_aff + 1; } // compteur élève $cpt_eleve = $cpt_eleve + 1; $i = $i + 1; // passer à la ligne $xcote_passe = $xcote_passe + $largeur + $espacementx; // placement de X et Y leur nouveau point $ycote_passe = $ycote_passeh; if($cpt_i_l == $nbl) { $ycote_passe = $ycote_passe + $hauteur + $espacementy; $ycote_passeh = $ycote_passe; $xcote_passe = $xcote; }
//logo $pdf->Image($logo, $X_logo, $Y_logo, $L_logo, $H_logo); } else { $X_etab = $X_entete_etab; $Y_etab = $Y_entete_etab; } // BLOC ADRESSE ETABLISSEMENT $caractere_utilse='DejaVu'; $affiche_logo_etab='1'; // affiché le logo de l'établissement $entente_mel='1'; // afficher dans l'entête le mel de l'établissement $entente_tel='1'; // afficher dans l'entête le téléphone de l'établissement $entente_fax='1'; // afficher dans l'entête le fax de l'établissement $pdf->SetXY($X_etab,$Y_etab); $pdf->SetFont('DejaVu','',14); $gepiSchoolName = getSettingValue('gepiSchoolName'); $pdf->Cell(90,7, ($gepiSchoolName),0,2,''); $pdf->SetFont('DejaVu','',10); $gepiSchoolAdress1 = getSettingValue('gepiSchoolAdress1'); $pdf->Cell(90,5, ($gepiSchoolAdress1),0,2,''); $gepiSchoolAdress2 = getSettingValue('gepiSchoolAdress2'); $pdf->Cell(90,5, ($gepiSchoolAdress2),0,2,''); $gepiSchoolZipCode = getSettingValue('gepiSchoolZipCode'); $gepiSchoolCity = getSettingValue('gepiSchoolCity'); $pdf->Cell(90,5, ($gepiSchoolZipCode." ".$gepiSchoolCity),0,2,''); $gepiSchoolTel = getSettingValue('gepiSchoolTel'); $gepiSchoolFax = getSettingValue('gepiSchoolFax'); if($entente_tel==='1' and $entente_fax==='1') { $entete_communic = 'Tél: '.$gepiSchoolTel.' / Fax: '.$gepiSchoolFax; } if($entente_tel==='1' and empty($entete_communic)) { $entete_communic = 'Tél: '.$gepiSchoolTel; } if($entente_fax==='1' and empty($entete_communic)) { $entete_communic = 'Fax: '.$gepiSchoolFax; } if(isset($entete_communic) and $entete_communic!='') { $pdf->Cell(90,5, ($entete_communic),0,2,'');