// Largeur des colonnes $largeur_col = array(); $largeur_col[1] = $largeur_col_nom_ele; $indice_col_app = array(); $taille_max_police = $hauteur_police; $taille_min_police = ceil($taille_max_police / 3); $x0 = $marge_gauche; $y0 = $marge_haute; $largeur_nomprenom_classe_et_notes = $marge_gauche + $largeur_col_nom_ele; $format_page = "P"; $pdf = new bul_PDF($format_page, 'mm', 'A4'); $pdf->SetCreator($gepiSchoolName); $pdf->SetAuthor($gepiSchoolName); $pdf->SetKeywords(''); $pdf->SetSubject('Toutes_notes'); $pdf->SetTitle('Toutes_notes'); $pdf->SetDisplayMode('fullwidth', 'single'); $pdf->SetCompression(TRUE); $pdf->SetAutoPageBreak(TRUE, 5); $pdf->AddPage(); $fonte = 'DejaVu'; $pdf->SetFont($fonte, 'B', 8); $avec_date_naiss = "n"; for ($i = 2; $i <= count($ligne1_csv); $i++) { if (preg_match("/^Date de naiss/", $ligne1_csv[$i])) { $avec_date_naiss = "y"; break; } } $largeur_col_notes = floor(10 * ($largeur_page - $marge_gauche - $marge_droite - $largeur_col_nom_ele - 15) / (count($ligne1_csv) - 2)) / 10; //$info_largeur_col_notes="\$largeur_col_notes=floor(10*($largeur_page-$marge_gauche-$marge_droite-$largeur_col_nom_ele-15)/(".count($ligne1_csv)."-2))/10=$largeur_col_notes";
if($h_cell>$h_max_cell) {$h_cell=$h_max_cell;} if($h_cell<$h_min_cell) { $h_cell=$h_min_cell; // Et on changera de page... // On pourrait recalculer une hauteur optimale avec 2 pages, 3 pages,... } } $pdf=new bul_PDF($format_page, 'mm', 'A4'); $pdf->SetCreator($gepiSchoolName); $pdf->SetAuthor($gepiSchoolName); $pdf->SetKeywords(''); $pdf->SetSubject('Examen blanc '.$id_exam); $pdf->SetTitle('Examen blanc '.$id_exam); $pdf->SetDisplayMode('fullwidth', 'single'); $pdf->SetCompression(TRUE); $pdf->SetAutoPageBreak(TRUE, 5); $fonte='DejaVu'; for($i=0;$i<$nb_classes;$i++) { $tab_notes=array(); $tab_moy=array(); $pdf->AddPage(); //======================================== // Titre $pdf->SetXY($x0, $y0); $texte="Relevé de notes de l'examen blanc n°$id_exam - Classe de ".$tab_classe[$i];
// définition d'une variable $hauteur_pris = 0; /***************************************** * début de la génération du fichier PDF * * ****************************************/ //header('Content-type: application/pdf'); //création du PDF en mode Portrait, unitée de mesure en mm, de taille A4 $pdf = new bul_PDF('p', 'mm', 'A4'); $nb_eleve_aff = 1; $categorie_passe = ''; $categorie_passe_count = 0; $pdf->SetCreator($gepiSchoolName); $pdf->SetAuthor($gepiSchoolName); $pdf->SetKeywords(''); $pdf->SetSubject('Releve_de_notes'); $pdf->SetTitle('Releve_de_notes'); $pdf->SetDisplayMode('fullwidth', 'single'); //$pdf->SetCompression(TRUE); $pdf->SetAutoPageBreak(TRUE, 5); $responsable_place = 0; } function regime($id_reg) { switch ($id_reg) { case "d/p": $regime = "demi-pensionnaire"; break; case "ext.": $regime = "externe"; break; case "int.":
$X1 = 0; $Y1 = 0; $X2 = 0; $Y2 = 0; $X3 = 0; $Y3 = 0; $X4 = 0; $Y4 = 0; $X5 = 0; $Y5 = 0; $X6 = 0; $Y6 = 0; //variables invariables $annee_scolaire = $gepiYear; $date_fb = date("d/m/Y H:i"); $date_fichier = date("Ymd_Hi"); $pdf=new bul_PDF('l', 'mm', 'A4'); $pdf->SetCreator($gepiSchoolName); $pdf->SetAuthor($gepiSchoolName); $pdf->SetKeywords(''); $pdf->SetSubject('Bulletin'); $pdf->SetTitle('Bulletin'); $pdf->SetDisplayMode('fullwidth', 'single'); $pdf->SetCompression(TRUE); $pdf->SetAutoPageBreak(TRUE, 5); // gestion des styles $pdf->SetStyle2("b","DejaVu","B",8,"0,0,0"); $pdf->SetStyle2("i","DejaVu","I",8,"0,0,0"); $pdf->SetStyle2("u","DejaVu","U",8,"0,0,0"); $taille=10; $pdf->SetStyle2("bppc","DejaVu","B",$taille,"0,0,0"); $pdf->SetStyle2("ippc","DejaVu","I",$taille,"0,0,0"); /*
$hauteur_page=210; $largeur_col_app=floor(($largeur_page-$marge_droite-$largeur_nomprenom_classe_et_notes)/$nb_col_app); } } for($i=0;$i<count($indice_col_app);$i++) { $largeur_col[$indice_col_app[$i]]=$largeur_col_app; } $pdf=new bul_PDF($format_page, 'mm', 'A4'); $pdf->SetCreator($gepiSchoolName); $pdf->SetAuthor($gepiSchoolName); $pdf->SetKeywords(''); $pdf->SetSubject('Mes_moyennes'); $pdf->SetTitle('Mes_moyennes'); $pdf->SetDisplayMode('fullwidth', 'single'); $pdf->SetCompression(TRUE); $pdf->SetAutoPageBreak(TRUE, 5); $pdf->AddPage(); $fonte='DejaVu'; $pdf->SetFont($fonte,'B',8); $texte_titre=$current_group['profs']['proflist_string']." - ".$current_group['description']." en ".$current_group['classlist_string']; $pdf->SetXY($x0,$y0); $texte=$texte_titre; $largeur_dispo=$largeur_page-$marge_gauche-$marge_droite;