get_cart("ALL"); if ($elt_flag && !$elt_no_flag) $liste = $myCart->get_cart("FLAG"); if ($elt_no_flag && !$elt_flag) $liste = $myCart->get_cart("NOFLAG"); //Tri des exemplaires par cote alphabétique $ordered_list = array(); for ($i=0;$i$liste[$i], 'cote'=>$row['expl_cote']); } $cotes = array(); foreach ($ordered_list as $key => $val) { $cotes[$key] = $val['cote']; } array_multisort($cotes, SORT_ASC, $ordered_list); // Démarrage et configuration du pdf $nom_classe = $fpdf . "_Etiquette"; $pdf = new $nom_classe ($label_grid_nb_per_row, $label_grid_nb_per_col, $page_orientation, $unit , $page_format ); $pdf->Open(); $pdf->SetPageMargins($label_grid_from_top, '0', $label_grid_from_left, '0'); $pdf->SetSticksMargins(0, 0, 0, 0); $pdf->SetSticksPadding($label_grid_h_spacing,$label_grid_v_spacing ); //Saut Etiquettes $pos = (($first_row-1)*$label_grid_nb_per_row) + ($first_col); for ($i=1;$i<$pos;$i++) { $pdf->AddStick(); } //Impression etiquettes for ($i=0;$iAddStick(); $content_src = $ordered_list[$i]['id']; foreach($content_type as $step=>$value) { $font_family = $content_value[$step]['font']; if(strtolower($font_family) == 'arial') $font_family='Helvetica'; if(!empty($font_family)) { if (empty($pdf->fonts[$font_family]) && array_key_exists(strtolower($font_family),$pdf->CoreFonts)===false && in_array($font_family,$pdf->CoreFonts)===false) { $pdf->AddFont($font_family); $pdf->AddFont($font_family, 'BI'); $pdf->AddFont($font_family, 'B'); $pdf->AddFont($font_family, 'I'); } } eval('print_'.$content_type[$step].'($pdf, $content_value[$step], $content_src); '); } } $pdf->Output('planche_etiquette.pdf', true); ?>