Qui ti spiega tutto...codice:define('FPDF_FONTPATH','font/'); require('fpdf.php'); $utente = "XXX"; $password = "XXXX"; $hostname = "XXXXXX"; $nome_database = "XXXXX"; $nome_tabella = "XXXX"; $nome_colonna = "XXXXX"; mysql_connect($hostname,$utente,$password); mysql_select_db ($nome_database); class PDF extends FPDF { function Header() { $this->Image('immagine.jpg',10,10,30); $this->Ln(30); } } $query = mysql_query("SELECT * FROM $nome_tabella"); $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial','',12); $pdf->Ln(); while($risultato = mysql_fetch_array($query)) { $pdf->Cell(100,8,$risultato[$nome_colonna],0,0,'L'); $pdf->Ln(); } $pdf->Output();
http://www.fpdf.org/it/doc/index.php
![]()

Rispondi quotando