$pdf->SetXY($xcote_passe, $ycote_passe); // gestion des encadrements $code_cadre = '0'; if($cadre === '1') { if($cpt_ligne_aff === '1' and $cpt_ligne_aff != $cpt_ligne[$i]) { $code_cadre = 'TRL'; } if($cpt_ligne_aff != '1' and $cpt_ligne_aff != $cpt_ligne[$i]) { $code_cadre = 'RL'; } if($cpt_ligne_aff != '1' and $cpt_ligne_aff == $cpt_ligne[$i]) { $code_cadre = 'RLB'; } } // calcule de la taille du texte des appréciation $hauteur_caractere = '11'; 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; }