Gracias
![Negando](http://static.forosdelweb.com/fdwtheme/images/smilies/negar.gif)
<?php
error_reporting(E_ALL);
include('class.ezpdf.php');
$pdf =& new Cezpdf();
$pdf->selectFont('./fonts/Helvetica');
$query = "select * from problema";
$conexion=pg_connect("host=xxxx port=5432
user=xxx password=xxx dbname=dep") OR die("No me puedo
conectar a la base de datos depred");
$res=pg_exec($conexion,$query);
$data = array();
$result =@pg_query($conexion,"select * from problema" );
while($data[]=@pg_fetch_array ($result,PGSQL_ASS)) {}
$pdf->ezTable($data);
if (isset($d) && $d){
$pdfcode = $pdf->output(1);
$pdfcode = str_replace("\n","\n<br>",htmlspecialchars($pdfcod e));
echo '<html><body>';
echo trim($pdfcode);
echo '</body></html>';
} else {
$pdf->stream();
}
?>