Sto provando ad utilizzare FPDF.. Mi sembra più facile e più completo... Riesco a visualizzare in output la costruzione della tabella ma non vedo i dati all'interno... posto le due pagine che ho creato...

Pagina provapdf.php:
Si occupa di prendere i valori della pagina precedente e creare l'output.

Codice PHP:
<?php
define
('FPDF_FONTPATH','../fpdf/font/');
//require('../fpdf/fpdf.php');
include('pdf.php');
@
$array_barcode=$_POST['barcodeart_vecchi'];
@
$array_descrizione=$_POST['descrizione'];
@
$array_quantita=$_POST['quantita'];
@
$array_prezzo=$_POST['prezzo'];
for (
$i = 0; $i <= sizeof($array_barcode); $i++) {
$data[] = array($array_barcode[$i], $array_descrizione[$i],$array_quantita[$i],$array_prezzo[$i] );
}
$h1_heading = "DdT n° 1";
$pdf=new PDF('P','mm','A4');
$pdf->AliasNbPages();
$pdf->SetFont('Times','B',12);

$w = $pdf->GetStringWidth($h1_heading)+40;
$pdf->AddPage();
$pdf->Cell($w,-12,$h1_heading, 0,1,'C');
$pdf->Ln(25);
//Column titles
$header=array('Barcode','Descrizione','Quantita','Prezzo');
$pdf->SetFont('Arial','B',16);
//Header
// make an array for the column widths
$w=array(25,30,25);
// call the table creation method
$pdf->BuildTable($header,$data,$w);
$pdf->Output();
?>
Questa invece è la classe che ho creato per la creazione della tabella e dell'header etc..
Codice PHP:
<?php

require('../fpdf/fpdf.php');

class
PDF extends FPDF {

function
Header() {
$timestamp = time();
$this->SetX(110);
$this->Cell(90,10,date("Y/m/d h:i:s A ",$timestamp), 0,0,'C');
$this->Ln(30);
}

function
Footer() {
$this->SetY(-15);
$this->SetFont('Arial','I',8);
$this->Cell(0,10,'Page '
.$this->PageNo().'/{nb}',0,0,'C');
}

function
BuildTable($header,$data,$w) {
$this->SetFillColor(255,153,51);
$this->SetTextColor(165,42,42);
$this->SetDrawColor(244,81,61);
$this->SetLineWidth(.1);
$this->SetFont('','B',8);

for(
$i=0;$i<count($header);$i++)
$this->Cell($w[$i],7,$header[$i],1,0,'C',1);

$this->Ln();

$this->SetFillColor(255,204,102);
$this->SetTextColor(0,0,100);
$this->SetFont('');
$fill=true;

foreach(
$data as $row) {
$fill =! $fill;
if(
$fill==0){
for(
$i = 0; $i<count($header); $i++ ){
// restore normal color settings
$this->SetFillColor(255,255,153);
$this->SetTextColor(244,81,61);
$this->SetFont('');
$this->Cell($w[$i],6,$row[$i],1,0,'C',true);
}
$this->Ln();
} else {
for(
$i = 0; $i<count($header); $i++ ){
// restore normal color settings
$this->SetFillColor(255,204,102);
$this->SetTextColor(244,81,61);
$this->SetFont('');
$this->Cell($w[$i],6,$row[$i],1,0,'C',true);
}
$this->Ln();
}
}
$this->Cell(array_sum($w),0,'','T');
}
}
?>
il risulatato che vedo in output è il seguente :



Dove caspita sbaglio?