Código PHP:
<?php
require_once('class.ezpdf.php');
$pdf =& new Cezpdf('a4');
$pdf->selectFont('../fonts/courier.afm');
$pdf->ezSetCmMargins(1,1,1.5,1.5);
$conexion = mysql_connect("localhost", "vasco", "vasco");
mysql_select_db("bolsaciti", $conexion);
$queEmp = "SELECT Nombre, Apellidos, Titulo_Puesto FROM empresa";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
$ixx = 0;
while($datatmp = mysql_fetch_assoc($resEmp)) {
$ixx = $ixx+1;
$data[] = array_merge($datatmp, array('num'=>$ixx));
}
$titles = array(
'num'=>'<b>Num</b>',
'Nombre'=>'<b>Nombre</b>',
'Apellidos'=>'<b>Apellidos</b>',
'Titulo_Puesto'=>'<b>Titulo_Puesto</b>'
);
$options = array(
'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500
)
$txttit = "<b>BLOG.UNIJIMPE.NET</b>\n";
$txttit.= "Ejemplo de PDF con PHP y MYSQL \n";
$pdf->ezText($txttit, 12);
$pdf->ezTable($data, $titles, '', $options);
$pdf->ezText("\n\n\n", 10);
$pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 10);
$pdf->ezText("<b>Hora:</b> ".date("H:i:s")."\n\n", 10);
$pdf->ezStream();
?>
-----------------------------------------------------------------------------------------------
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\BolsaTI\PDF.php on line 3
Parse error: parse error in C:\wamp\www\BolsaTI\PDF.php on line 27
------------------------------------------------------------------------------------------
De antemano Gracias Foreros!!!