wrzuce Ci moj skrypcik ktory napisalem, musisz sobie go przerobic, funkcja ta wyswietla na pierwsszej stronie 5 wynikow na pozostalych po 10
Kod
class pdf extends jakas_klasa{
.function footer
function header
.
.
function barcodes(){
global $invent; //tu byla moja tablica wynikowa mialem od 1 czasem do ok 50 wynikow
$x=20;
for($i=0; $i<=count($invent);$i++){
$this->SetFont('Arial','',12);
$this->SetTextColor(0,0,0);
if($i<5){
$zz=$count*30+120;
if($invent[$i]['i_barcode']!=0){
$this->code39($x,$zz*2-15,$invent[$i]['i_barcode']);
}
$this->Text($x+70,$zz,$invent[$i]['I_Name']);
$this->Text($x+120,$zz,$invent[$i]['owner']);
if($count==4){ $this->AddPage(); $count=0; }
}else{
if($count==10){ $this->AddPage(); $count=0; }
$zz=$count*30+20;
$this->code39($x,$zz*2-15,$invent[$i]['i_barcode']);
$this->Text($x+70,$zz,$invent[$i]['I_Name']);
$this->Text($x+120,$zz,$invent[$i]['owner']);
}
$count++;
}
for($i=$cz;$i<$ile+$c;$i++){
$this->SetFont('Arial','',12);
$this->SetTextColor(0,0,0);
$this->Text($x,$y,$invent[$i]['i_barcode']);
$this->Text($x+50,$y,$invent[$i]['I_Name']);
$this->Text($x+120,$y,$invent[$i]['owner']);
$y+=10;
}
}