Erfaring med FPDF?
Har bygget en tabel med cells, og det fungerer i og for sig udemærket. Men sætter jeg et image ind, der hvor der er baggrundsfarve, placeres det BAG baggrundsfarven??? Er det bare almindelig tekst fungerer det finemang.Kode start------------------------
function FancyTable($data)
{
$w=array(20,8,17,17,80,15,35,13,13,13);
//Color and font restoration
$this->SetFillColor(224,235,255);
$this->SetTextColor(0);
$this->SetFont('');
//Data
$fill=0;
//print_r($data);
if(count($data)>0){
foreach($data as $row)
{
$this->Cell($w[0],6,$row[0],'LR',0,'R',$fill);
if($row[1]!='F' || $row[1]!='f' || $row[1]!=''){
$rowimage=$this->Image('images/palle.JPG',$this->GetX()+2,$this->GetY()+1);
$this->Cell($w[1],6,$rowimage,'LR',0,'C',0);
}
else{
$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);
}
$this->Cell($w[2],6,$row[2],'LR',0,'R',$fill);
$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);
$this->Cell($w[4],6,$row[4],'LR',0,'L',$fill);
$this->Cell($w[5],6,$row[5],'LR',0,'R',$fill);
$this->Cell($w[6],6,$row[6],'LR',0,'R',$fill);
$this->Cell($w[7],6,$row[7],'LR',0,'R',$fill);
$this->Cell($w[8],6,$row[8],'LR',0,'R',$fill);
$this->Cell($w[9],6,$row[9],'LR',0,'R',$fill);
$this->Ln();
$fill=!$fill;
}
$this->Cell(array_sum($w),0,'','T');
}
else {
$this->Cell($w[0],6,0,'LR',0,'C',$fill);
$this->Cell($w[1],6,0,'LR',0,'C',$fill);
$this->Cell($w[2],6,0,'LR',0,'C',$fill);
$this->Cell($w[3],6,0,'LR',0,'C',$fill);
$this->Cell($w[4],6,0,'LR',0,'C',$fill);
$this->Cell($w[5],6,0,'LR',0,'C',$fill);
$this->Cell($w[6],6,0,'LR',0,'C',$fill);
$this->Cell($w[7],6,0,'LR',0,'C',$fill);
$this->Cell($w[8],6,0,'LR',0,'C',$fill);
$this->Cell($w[9],6,0,'LR',0,'C',$fill);
$this->Ln();
$fill=!$fill;
$this->Cell(array_sum($w),0,'','T');
}
}
Kode slut-------------------------------------------------------
